我正在尝试使用相对较新的TFS REST API。 我可以按ID获取单个工作项,所有详细信息(例如链接中的其他链接工作项)......但我找不到任何提示或示例如何获取给定的所有测试结果(测试运行?)测试用例。
或者我必须"下载" (获取)我计划的所有测试套件中的所有测试的所有测试结果,以手动过滤掉我想要的测试用例的两个或三个测试结果?
答案 0 :(得分:1)
测试结果与测试用例无直接关联。测试用例可以作为多个测试套件的一部分在多个测试平面上通过和失败。
您需要首先查找所有飞机,然后确实包含该测试用例,然后在获得结果之前猜测上下文。
如果您使用套件ID,则可以轻松查找结果。
答案 1 :(得分:0)
<div class="container mx-auto">
<!--Add class table-responsive for responsive table -->
<table class="table mx-auto">
<thead>
<tr>
<th>Name</th>
<th>Surname</th>
<th>Email</th>
<th>Phone</th>
<th>Address</th>
<th>Zipcode</th>
<th>City</th>
<th>Company</th>
</tr>
</thead>
<tbody>
<ul class="pagination">
<?php
if(isset($_GET['page'])){
$previous = $_GET['page'] - 1;
if($previous = -1 ){
$previous = 0;
}
if($previous = 0){
echo '<li class="page-item"><a class="page-link" href="#">Previous</a></li>';
}
else{
echo '<li class="page-item"><a class="page-link" href="?page='. $previous.'">Previous</a></li>';
}
}
$page_max = 10;
$entriesInDatabase = $database->getData("SELECT count(id) FROM customers");
$numberOfPages = ceil($entriesInDatabase['count(id)']/$page_max);
for($i = 0; $i < $numberOfPages; $i++){
echo '<li class="page-item"><a class="page-link" href="?page='. $i . '">'. $i. '</a></li>';
}
if(isset($_GET['page'])) {
$page = $_GET['page'];
$start = $page * 10;
$end = ($page + 1) * 10;
var_dump($start);
var_dump($end);
}
else{
$page = 0;
$start = $page * 10;
$end = 10;
}
$customers = $database->getUsers("SELECT * FROM customers LIMIT $start, $end");
?>
<li class="page-item"><a class="page-link" href="#">Next</a></li>
</ul>
<?php
foreach($customers as $customer){
$name = $customer ['name'];
$surname = $customer['surname'];
$email = $customer['email'];
$phone = $customer['phone'];
$address = $customer['address'];
$zipcode = $customer['zipcode'];
$city = $customer['city'];
$company = $customer['company'];
$id = $customer['id'];
echo "<tr>
<td>$name</td>
<td>$surname</td>
<td>$email</td>
<td>$phone</td>
<td>$address</td>
<td>$zipcode</td>
<td>$city</td>
<td>$company</td>
</tr>";
}
?>