TSMaster Test Report Generator Operation Guide

Sharing | TSMaster Test Report Generator Operation Guide

The TSMaster Test Report Generator is required when users develop test cases based on the TSMaster software, or when they need to generate HTML reports using TSMaster.
Table of Contents for this article

01. Test_Report Description

Test_Report is a set of test report templates provided by TSMaster for customers, which integrates test report printout, image display, test status display, test pass/fail rate display, and execution time display as a whole, the test report example is shown below:
Test_Report Description

02, Test_Report function description

1.test_init

function name
s32 test_init(const pnative_int Handle, const char* ReportName)
Function
Initialize the test report generator and specify the name of the generated HTML report
call location
You need to call this function to initialize before executing other functions.
input parameter
Handle :Handle to the test report

ReportName: HTML name of the report

return value
==0: function executed successfully

Other values: function execution failed

typical example
native_int Handle = 0;

Test_init(&Handle , "testReport").

2.test_title

function name
s32 test_title(const native_int Handle, const char* testgroup, const char* testcase, const char* image, const char* testpurpose)
Function
Enter the test case group to which the current test case belongs, the name of the test case, and related information.
call location
Called before the start of each test case, this function is used to identify the test case group, test case name, and can be imported into the test environment picture and the purpose of the test and reference standards
input parameter
Handle : Handle to the test report

testgroup:: name of test case group

testcase: name of the test case

image: test environment picture, can be any picture, can be empty

Testpurpose: the purpose of the test and the test reference standard, string, separated by commas, can be empty

return value
==0: function executed successfully

Other values: function execution failed

typical example
native_int Handle = 0;

s32 ret = Test_init(&Handle , "testReport");

if(ret == 0)

{

test_title(Handle , "testgroup1", "testcase1", "", "");

}

3.test_step

function name
s32 test_step(const native_int Handle, const char* teststep, const char* Description)
Function
Specific steps and descriptions for documenting test cases
call location
Called after the test_title function for each test case.
input parameter
Handle :Handle to the test report

teststep: test step

Description:Step description, can be separated by English commas, to enter the desired results and actual results

return value
==0: function executed successfully

Other values: function execution failed

typical example
native_int Handle = 0;

s32 ret = Test_init(&Handle , "testReport");

if(ret == 0)

{

test_title(Handle , "testgroup1", "testcase1", "", "");

test_step(Handle, "1", "Starting to power up, powering up successfully, powering up successfully");;

}

4.test_pass

function name
s32 test_pass(const native_int Handle, const char* teststep, const char* Description)
Function
Marking a step in a test case as passing the
call location
The test_title function for each test case is followed by the
input parameter
Handle :Handle to the test report

teststep: test step

Description:Step Description

return value
==0: function executed successfully

Other values: function execution failed

typical example
native_int Handle = 0;

s32 ret = Test_init(&Handle , "testReport");

if(ret == 0)

{

test_title(Handle , "testgroup1", "testcase1", "", "");

test_step(Handle, "1", "Starting to power up, powering up successfully, powering up successfully");;

test_pass((Handle, "1", "Starting to power up").

}

5.test_fail

function name
s32 test_fail(const native_int Handle, const char* teststep, const char* Description)
Function
Marking a step in a test case as a failure
call location
The test_title function for each test case is followed by the
input parameter
Handle :Handle to the test report

teststep: test step

Description:Step Description

return value
==0: function executed successfully

Other values: function execution failed

typical example
native_int Handle = 0;

s32 ret = Test_init(&Handle , "testReport");

if(ret == 0)

{

test_title(Handle , "testgroup1", "testcase1", "", "");

test_step(Handle, "1", "Starting to power up, powering up successfully, powering up successfully");;

test_fail(Handle, "1", "Power-up failure");

}

6.test_final

function name
s32 test_final(const native_int Handle)
Function
End test report generation, release the handle and generate the final HTML test report.
call location
Called after all test cases have been executed.
input parameter
Handle :Handle of the test report
return value
==0: function executed successfully

Other values: function execution failed

typical example
native_int Handle = 0;

s32 ret = Test_init(&Handle , "testReport");

if(ret == 0)

{

test_title(Handle , "testgroup1", "testcase1", "", "");

test_step(Handle, "1", "Starting to power up, powering up successfully, powering up successfully");;

test_fail(Handle, "1", "Power-up failure");

test_final(Handle).

}

发表回复

en_USEnglish
×
×

产品入口: 产品添加到购物车

Download location

Please click the download button below to start experiencing the powerful TSMaster features. Thank you for your support!

Beta version updated weekly, full version updated monthly
Installation environment
  • 1
    Windows 7 SP1 or higher, supports Win10, and WIn11.

    Operating System

  • 2
    8GB

    random access memory (RAM)

  • 3
    At least 550MB of free space

    disk space

  • 4
    Dual-core (2-core) or higher

    CPU

Please ensure that your computer meets at least these requirements in order to install and run the TSMaster software successfully. If your computer does not meet these requirements, it may cause performance problems or not run the software properly. You may want to consider upgrading your hardware if you need smoother running features.