For some cases, one might find himself in a situation where in , he may require to schedule a test to run late night or later point in time. To achieve this with Rational Performance tester, it can be done by scheduling a window task to run a batch file(or crontab to run a shell script) containing the command line that execute the tests
To get cracking on this, first thing is to get the command line written up to execute the rational performance tester test or schedule. For this you need to get the following parameter values that later needs to passed to command through command line.
-workspace : Path to workspace in which the test or test schedule is present. If you are not aware of this, quick way to get the path value of your workspace is to get this from properties window of the project. Right click of the project node and select properties from the menu. Then the value in the location tab of resource node is the value of the workspace path.
-project : This is the name of the project
-schedule: This is the schedule or the test that is required to executed. To get the value for the test that needs to be executed is to right click of the schedule or the test and select properties from the right click menu. On Properties window, copy the value that is displayed for “Path”.
Once you have this value, you got the all the information you required to execute the command line. The command you need execute depends is available in plugin directory. There are both shell and batch version. This typically something like “This is typically C:\Program Files\IBM\Rational\SDP\6.0\rpt_prod\eclipse\plugins\com.ibm.rational.test.lt.cmdlineexecute_6.1.2.” In this directory, there are files with .bat and .sh extension which can be used for windows and Unix respectively
To check if the command line works, navigate to above directory and then issue following command
cmdline –workspace “workspace “–project “testproj” –schedule “schedule_or_test”
Once the above command works, you can create a shell script or batch file that can referenced in cron tab or scheduler to execute is automatically.
No comments:
Post a Comment