diff options
author | raghavendracharik <raghavendrachari.kamsali@hpe.com> | 2016-07-20 04:10:13 -0700 |
---|---|---|
committer | Jose Lausuch <jose.lausuch@ericsson.com> | 2016-07-21 11:24:32 +0000 |
commit | 7f623d269e76c3c720891e90a015db2b7f544d10 (patch) | |
tree | 292f6c4824fee21bbc4647c65d26def2bbb57288 /declaration/testcases.php | |
parent | 8c68a19284c5507007ead6025ada4a6e61b9ba9f (diff) |
Implementation of testcase/pod declaration dashboard for adding tescases
JIRA: FUNCTEST-26
Change-Id: Iceb1c54ba8c245d43cc553533fdf4fd3284c7132
Signed-off-by: raghavendracharik <raghavendrachari.kamsali@hpe.com>
Diffstat (limited to 'declaration/testcases.php')
-rw-r--r-- | declaration/testcases.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/declaration/testcases.php b/declaration/testcases.php new file mode 100644 index 0000000..2064580 --- /dev/null +++ b/declaration/testcases.php @@ -0,0 +1,36 @@ +<?php + if(isset($_REQUEST['project'])){ + $selected=$_REQUEST['project']; + } + else{ + $url = "http://testresults.opnfv.org:80/test/api/v1/projects"; + $response = file_get_contents($url); + $data = json_decode($response); + $projects=$data->projects; + $selected=$projects[0]->name; + } + $new_url="http://testresults.opnfv.org:80/test/api/v1/projects/".$selected."/cases"; + $response = file_get_contents($new_url); + $data = json_decode($response); + $testcases=$data->testcases; + $i=0; + $column_str=""; + $column_str=$column_str."<table class=\"table table-striped\"><tr>"; + $column_str=$column_str."<th>#</th><th>Test Case Name</th>"; + $column_str=$column_str."<th>Creation Date</th>"; + $column_str=$column_str."<th>Description</th></tr>"; + foreach ( $testcases as $testcase ){ + $i=$i+1; + $column_str=$column_str."<tr>"; + $column_str=$column_str."<td>".$i."</td>"; + $column_str=$column_str."<td>".$testcase->name."</td>"; + $column_str=$column_str."<td>".$testcase->creation_date."</td>"; + $column_str=$column_str."<td>".$testcase->description."</td>"; + $column_str=$column_str."</tr>"; + + } + $column_str=$column_str."</table>"; + echo $column_str; + +?> + |