ZenTao is a domestic open source R&D project management software, designed based on agile and CMMI management concepts, which completely covers the core process of project management. According to the "2021 Software Testing Status Survey Report" by the domestic authoritative testing website 51Testing, ZenTao has ranked first among "commonly used test management tools" for seven consecutive years.
In the previous feature article we argued that with the popularity of continuous integration and DevOPS, automated testing has become an integral part of R&D activities. It can even be said that continuous integration and DevOps are not successful without mature automated testing.
This article introduces how to integrate third-party automated testing tools with ZenTao to create a one-stop complete R&D management platform. The content is based on ZenTao version 16.5. For earlier versions, please install the RestAPI plugin here and continue.
First, you can associate the company's existing automated test scripts with the use cases in ZenTao, and then you can count the automation rate of ZenTao test cases. By calling the ZenTao testcases interface, information such as test steps and expected results can be synchronized between ZenTao and the automation system. In ZenTao's open-source automated testing framework ZTF, we use the comments at the top of the script to support the mapping and synchronization of ZTF's self-managed test scripts to ZenTao use cases.
#!/usr/bin/env php
<?php
/**
title=the simple demo for ztf
cid=0
pid=0
1. step1 >> expect 1
2. step2
3. step3 >> expect 3
*/
print("expect 1\n");
print("expect 3\n");
You can use ZenTao's continuous integration feature to execute unit or automated tests in a pipeline. After the execution is completed, the output test results are submitted to ZenTao using the ciresults interface, and the test report is displayed in a centralized manner in ZenTao. In ZenTao's open source automated testing framework ZTF, we support the synchronization of script execution results, unit test results and reports from the third-party general reporting tool Allure Report to ZenTao. If the number cid of the Zendao use case is set in the ZTF script comment, or the number of the unit test case is set in Allure through annotation (comment) or code, the specific test result will be linked to the specified Zendao use case after synchronization. .
When a use case fails during test execution, bugs can be submitted to ZenTao using the bugs interface. The description of the defect can be obtained from the execution steps of the ZTF script, the expected result, the actual result, or the output information of the unit test. For details, please refer to the implementation of the cb submission defect instruction of the ZTF open source project.
With the relationship between the requirements, use cases, scripts, executions, results and defects maintained in your R&D management system, you can obtain the required use case design coverage, use case automation coverage, certain Metrics such as execution coverage of use cases or requirements in the next iteration.
Below is a list of ZenTao interfaces you may need to use for your reference.
Log in
POST
api.php/v1/tokens
List all products
GET
api.php/v1/products
List use case modules for the product
GET
api.php/v1/modules?type=case&id=<product_id>
List product test suites
GET
api.php/v1/products/<product_id>/testsuites
List product test suites
GET
api.php/v1/testtasks?product=<product_id>&limit=1000
Get use cases by module
api.php/v1/products/%d/testcases?module=%d
Get use cases by suite
api.php/v1/testsuites/%d
Get use cases based on tasks
api.php/v1/testtasks/%d
Get use case details
GET
api.php/v1/testcases/%d
Update use case content
PUT
api.php/v1/testcases/%d
Submit test results
POST
api.php/v1/ciresults
Submit a bug
POST
api.php/v1/products/<product_id>/bugs
For the above interface, you can find the detailed introduction of its API in Zendao "Document -> Interface Library". In the ZTF open source test framework project, we have used Golang to implement it. For details, please refer to here .
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。