ttop / cuanto

A test results repository and test analysis tool
http://trackyourtests.com
GNU Lesser General Public License v3.0
29 stars 20 forks source link

Update on 137 #12

Closed dunse closed 6 years ago

dunse commented 12 years ago

Changes:

Example to display all three graph types using Flot:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Cuanto Flot Graph Example</title>
<script src="javascripts/flot/jquery.min.js"></script>
<!--[if lte IE 8]><script src="javascripts/flot/excanvas.min.js" type="text/javascript" charset="UTF-8"></script><![endif]-->
<script src="javascripts/flot/jquery.flot.js" type="text/javascript" charset="UTF-8"></script>
<script src="javascripts/flot/jquery.flot.pie.js" type="text/javascript" charset="UTF-8"></script>
</head>
<body>
<h2>Trend results</h2>
<div id="results" style="width:40%;height:400px;" ></div>
<h2>Results summary</h2>
<div id="resultssummary" style="width:40%;height:400px;" ></div>
<h2>Blame chart</h2>
<div id="blame" style="width:40%;height:400px;" ></div>
<script type="text/javascript">
<!--
$(function () {
    // Outcome chart
    $.get('/cuanto/api/getAllTestRunStatsGraph?projectKey=ClientTest',
        function(response) {
            $.plot($("#results"), response, {
                xaxis : {
                    mode : "time"
                }
            });
        })
    // Pie Outcome chart
    $.get('/cuanto/api/getAllTestRunStatsGraph?projectKey=ClientTest&noTime=true',
        function(response) {
            var data = [response[1], response[2], response[3]];
            $.plot($("#resultssummary"), data, {
                series: {
                    pie: { 
                        show: true,
                        max: 6
                    }
                },
                legend: {
                    show: false
                }
            });
        })
    // Pie Outcome chart
    $.get('/cuanto/api/getAllFailedTestCaseHistoryGraph?projectKey=ClientTest',
        function(response) {
            $.plot($("#blame"), response, {
                series: {
                    pie: { 
                        show: true,
                        max: 6
                    }
                },
                legend: {
                    show: false
                }
            });
        })
});
//-->
</script>
</body>
</html>
dunse commented 11 years ago

Any chance this pull request could be merged?

ttop commented 11 years ago

I will try to evaluate it sometime soon. What's the benefit of appending "\u001e\u001e"?

On Mar 5, 2013, at 6:07 AM, dunse notifications@github.com wrote:

Any chance this pull request could be merged?

— Reply to this email directly or view it on GitHub.

dunse commented 11 years ago

Thanks!

Appending "\u001e\u001e" at the end of the truncated text makes it possible to display the info text (In the test output popup) if the maxTestOutputLength is ever changed.

ttop commented 11 years ago

Hi, sorry for the delay with this. A couple notes:

There don't appear to be any integration tests. That would be helpful.

Will the inserted characters make search fail if you are searching on terms that cross the truncation boundary?

-Todd ttopwells@gmail.com

On Tue, Mar 5, 2013 at 6:19 AM, dunse notifications@github.com wrote:

Thanks!

Appending "\u001e\u001e" at the end of the truncated text makes it possible to display the info text (In the test output popup) if the maxTestOutputLength is ever changed.

— Reply to this email directly or view it on GitHubhttps://github.com/ttop/cuanto/pull/12#issuecomment-14441964 .