Home Corporate Contacts

TETware Knowledgebase


Products
Solutions

Information

Datasheet
Documentation
FAQ
Knowledgebase

Return to Knowledgebase Index

10. Repeated scenario execution without modifying the scenario file

 

Question

A requirement of our manufacturing people is for tcc to be able to invoke repeated executions (for example: for hardware stress testing) without having to change the scenario files. Developers write the scenarios and don't want repetitive execution. But manufacturing, who wish to reuse the tests, do.

 

Answer

There are a couple of ways that you can do this using existing TETware functionality.

 

Method 1

(When you know how many times the manufacturing people want to repeat when you write the scenario.)

You can provide more than one scenario when you write the scenario file. One scenario can list all the tests, and the other can repeat the first scenario the required number of times.

For example:


manufacturer
	:repeat,100:^developer

developer
	/ts/tc1/tc1
	/ts/tc2/tc2
	. . .
	etc.


Your developers can use the scenario called developer in the example above and the manufacturing people can use the scenario called manufacturer.

You can choose which scenario to execute on the tcc command-line. For example, to execute all the tests in the list once:


tcc -ep  test-suite-name developer
or, to execute all the tests in the list 100 times:

tcc -ep  test-suite-name manufacturer


Notes:
  1. If one of the scenarios in the file is called all, you don't need to use the `` test-suite-name scenario-name'' style of syntax on the tcc command-line.


  2. You can use :timed_loop: instead of :repeat: if your manufacturing people would find this more helpful. But don't do this until you are satisfied that the test cases are working reliably.


Method 2

(When you want to specify the number of times to repeat the scenario on the tcc command-line.)

In this method, you specify the basic scenario in a file and add a :repeat: directive on the command-line.

The scenario file should contain the non-repeating list of tests as in Method 1; for example:


developer
	/ts/tc1/tc1
	/ts/tc2/tc2
	. . .
	etc.


To execute all the tests once, you invoke tcc in the same way as in Method 1; for example:

tcc -ep  test-suite-name developer


You can specify both the -l and -s options to process a scenario defined in a file under the control of a directive specified on the command-line. So, to repeat all the tests 50 times, you would say:

tcc -ep -s tet_scen -l ":repeat,50:^developer"
or, to repeat all the tests for (at least) 10 hours, you would say:

tcc -ep -s tet_scen -l ":timed_loop,36000:^developer"


Notes:
  1. When you specify scenario lines using one or more -l options, tcc processes the lines as if they were in a scenario called all. So when you use -l and -s together, you can't have a scenario called all in the file specified by the -s option.

As can be seen from these examples, it is possible to invoke tcc with lots of different combinations of command-line options. It is usual to supply a shell script which contains the correct tcc invocation in cases where the command-line becomes too complicated to type in directly.

See also

  • "The scenario file'' in the TETware Programmers Guide.

  • The tcc manual page in the TETware Users Guide.


 


Home Contacts Legal Copyright Corporate News

Copyright © The Open Group 1995-2012, All Rights Reserved