GiD - The personal pre and post processor
Command line
tester accept this optional command line options:
-project $project_path -eval $tcl_code -source $tcl_filename -gui 0|1 -xunit_log $xunit_filename -verbose 0|1
-project $project
to start and load the project (a .tester folder with the project configuration files)
example:
tester.exe -project "C:\tester projects\developer x64.tester"
-eval $tcl_code
to evaluate this code, for example start and then run all cases
example:
tester.exe -project "$tester_project" -gui 0 -source "$TESTERDIR"/xunit_log.tcl -xunit_log "$BASEDIR"/test-reports/TEST-tester-tiny-cases-$timestamp.xml -verbose 1 -eval "tester::run_all ; tester::exit_with_error_code"
Here the file xunit_log.tcl is defining procs to write the report in the desired xml format, and implementing some tester events
-source $tcl_filename
to evaluate the tcl code written in a .tcl file
-gui 0|1
to show or not the GUI (e.g. without GUI to be run from other testing tool, doing the tests and providing the results from the log file)
-xunit_log $xunit_filename
used to run tester without GUI, load a project, run its cases, write a log file with xunit xml syntax and exit (e.g. to be used in a git pipeline)
example:
tester.exe -project "$tester_project" -gui 0 -source "$TESTERDIR"/xunit_log.tcl -xunit_log "$BASEDIR"/test-reports/TEST-tester-tiny-cases-$timestamp.xml -verbose 1 -eval "tester::run_all ; tester::exit_with_error_code"
in this example the external file xunit_log.tcl
define procs to write results in the desired format, and implement some tester events to open the document, print and close it.
proc ::tester::event_before_run_cases { lst_cases_ids}
proc ::tester::event_after_run_case { case_id}
proc ::tester::event_after_run_cases { case_ids}
-verbose 0|1
for debugging tester purposes, printing more warnings and error messages
Related content
COPYRIGHT © 2022 · GID · CIMNE