(→Test plan based executions) |
(→Using OTS trigger) |
||
| (11 intermediate revisions not shown) | |||
| Line 15: | Line 15: | ||
conductor --help | conductor --help | ||
| - | + | === Using OTS trigger === | |
| - | === Using | + | |
'''Note:''' Before starting to execute tests with ots_trigger, verify that your ots-worker is configured correctly. That can be done with conductor, see the topic above. | '''Note:''' Before starting to execute tests with ots_trigger, verify that your ots-worker is configured correctly. That can be done with conductor, see the topic above. | ||
| - | + | OTS trigger is tool for triggering a testrun to OTS server. | |
| - | [[Quality/QA-tools/OTS/UserDocumentation/Installation#OTS_tools| How to install | + | [[Quality/QA-tools/OTS/UserDocumentation/Installation#OTS_tools| How to install OTS trigger]]. |
Before you can trigger a testrun, you need to have all following: | Before you can trigger a testrun, you need to have all following: | ||
| Line 32: | Line 31: | ||
* Test package installed to the device | * Test package installed to the device | ||
* Test package installed to the ots-worker or | * Test package installed to the ots-worker or | ||
| - | * Test plan [ | + | * Test plan [http://wiki.meego.com/Quality/QA-tools/OTS/UserDocumentation/Usage#Test_plan_based_executions Test plan based executions] |
Okey, now we are ready to get dirty. | Okey, now we are ready to get dirty. | ||
If we have test package(s) installed into the device and we want to execute all of them: | If we have test package(s) installed into the device and we want to execute all of them: | ||
| - | ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 --email=my.name@company.com | + | ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 \ |
| + | --email=my.name@company.com | ||
Let me explain the parameters. | Let me explain the parameters. | ||
| Line 43: | Line 43: | ||
* '''build_id''': Free string to define the image build id. | * '''build_id''': Free string to define the image build id. | ||
* '''image''': Url path where the image is located. Yes, it must be on the http server. | * '''image''': Url path where the image is located. Yes, it must be on the http server. | ||
| - | * '''sw_product''': The default SW test execution options, you have defined the sw_product in /etc/ | + | * '''sw_product''': The default SW test execution options, you have defined the sw_product in /etc/ots/server.conf. |
* '''email''': Who has requested the testrun and to whom to send notifications. | * '''email''': Who has requested the testrun and to whom to send notifications. | ||
| - | That was simple. Next you want to execute only one package, no problem, just define test package name to | + | That was simple. Next you want to execute only one package, no problem, just define test package name to OTS trigger: |
| - | ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 --email=my.name@company.com --testpackages=my-test-package1-tests | + | ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 \ |
| + | --email=my.name@company.com --testpackages=my-test-package1-tests | ||
In to the '''testpackages''' option, you can define multiple packages like this: | In to the '''testpackages''' option, you can define multiple packages like this: | ||
| Line 53: | Line 54: | ||
If you want to add more people to receive email after the execution is done, just add more email addresses to --email option: | If you want to add more people to receive email after the execution is done, just add more email addresses to --email option: | ||
| - | ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 --email=my.name@company.com,second.name@company.com | + | ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 \ |
| + | --email=my.name@company.com,second.name@company.com | ||
If you have test package installed to your ots-worker machine, that can be executed with --hostpackages: | If you have test package installed to your ots-worker machine, that can be executed with --hostpackages: | ||
| - | ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 --email=my.name@company.com --hostpackages=my-test-package1-tests | + | ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 \ |
| + | --email=my.name@company.com --hostpackages=my-test-package1-tests | ||
For optimizing the execution time, see distribution models section below. | For optimizing the execution time, see distribution models section below. | ||
| Line 67: | Line 70: | ||
Test plan based execution means that the user can create a test plan and give it directly to ots_trigger without making any test package. This brings benefits when executing different test against the same test image or release. | Test plan based execution means that the user can create a test plan and give it directly to ots_trigger without making any test package. This brings benefits when executing different test against the same test image or release. | ||
| - | + | You can find simple examples of testplans in [https://meego.gitorious.org/meego-quality-assurance/ots/trees/master/ots.system_tests/log_tests/data System test data] | |
| + | |||
| + | Test plan can be also created with [http://wiki.meego.com/Quality/QA-tools/Testplanner Testplanner]. | ||
And then give the test plan to ots_trigger with --deviceplan or --hostplan. Difference between these options are that 'deviceplan' is executed in the device and 'hostplan' in the ots-worker. | And then give the test plan to ots_trigger with --deviceplan or --hostplan. Difference between these options are that 'deviceplan' is executed in the device and 'hostplan' in the ots-worker. | ||
ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 \ | ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 \ | ||
| - | --email=my.name@company.com --deviceplan=/path/to/my/test_plan.xml | + | --email=my.name@company.com --deviceplan=/path/to/my/test_plan.xml |
== Distribution models == | == Distribution models == | ||
| Line 105: | Line 110: | ||
== Running tests in chroot environment == | == Running tests in chroot environment == | ||
| - | Chroot functionality makes possible to use chroot environment with specific software to run the tests. This way a test case which needs specific software can be started at any OTS worker and a worker will stay clean of additional software. | + | Chroot functionality makes possible to use chroot environment with specific software to run the tests. This way a test case which needs specific software can be started at any OTS worker and a worker will stay clean of additional software. Chroot based testing is primarily targeted at executing tests with the [[Quality/QA-tools/TDriver|Testability Driver framework]]. |
=== How to create rootstrap? === | === How to create rootstrap? === | ||
| Line 123: | Line 128: | ||
** Test packages to be executed on chroot environment | ** Test packages to be executed on chroot environment | ||
* --rootstrap=<rootstrap_file> | * --rootstrap=<rootstrap_file> | ||
| - | ** The rootstrap | + | ** The rootstrap URL |
Example like this: | Example like this: | ||
Contents |
Conductor is the executer in the ots-worker. You can use conductor to test device flashing and for semi-automatic test executions.
To test flashing and basic test execution:
conductor --imageurl=http://192.168.1.1/image.tar.gz
The conductor flasher the image to the device and executes all available test packages.
To list all supported options:
conductor --help
Note: Before starting to execute tests with ots_trigger, verify that your ots-worker is configured correctly. That can be done with conductor, see the topic above.
OTS trigger is tool for triggering a testrun to OTS server.
Before you can trigger a testrun, you need to have all following:
And one of the following options:
Okey, now we are ready to get dirty.
If we have test package(s) installed into the device and we want to execute all of them:
ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 \ --email=my.name@company.com
Let me explain the parameters.
That was simple. Next you want to execute only one package, no problem, just define test package name to OTS trigger:
ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 \ --email=my.name@company.com --testpackages=my-test-package1-tests
In to the testpackages option, you can define multiple packages like this:
--testpackages=my-test-package1-tests,my-test-package2-tests
If you want to add more people to receive email after the execution is done, just add more email addresses to --email option:
ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 \ --email=my.name@company.com,second.name@company.com
If you have test package installed to your ots-worker machine, that can be executed with --hostpackages:
ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 \ --email=my.name@company.com --hostpackages=my-test-package1-tests
For optimizing the execution time, see distribution models section below.
To list all supported options:
ots_trigger --help
Test plan based execution means that the user can create a test plan and give it directly to ots_trigger without making any test package. This brings benefits when executing different test against the same test image or release.
You can find simple examples of testplans in System test data
Test plan can be also created with Testplanner.
And then give the test plan to ots_trigger with --deviceplan or --hostplan. Difference between these options are that 'deviceplan' is executed in the device and 'hostplan' in the ots-worker.
ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 \ --email=my.name@company.com --deviceplan=/path/to/my/test_plan.xml
These are models how the OTS is distributing test executions to ots-workers. There are 2 build-in models and other ones are distribution model plug-ins.
Distribution model can be specified to ots_trigger with --distribution option.
This is the default model, if nothing else has been specified.
Default model executes all test packages in a single task, so only one ots-worker will handle the test execution. Only exception to this model is test plan based executions, they are always executed as an own task and therefor distributed to multiple workers.
---distribution=perpackage
Perpackage is the second build-in distribution model.
This models creates always an own task for each test package and test plan, so multiple ots-worker can handle the testrun at the same time.
---distribution=optimized
Optimized is a distribution plug-in and it is part of history plug-in.
History plug-in collects test package execution times to a database. When the user triggers a testrun, he/she can specify how long the execution should take and how many device can be used. The optimized model then tries to optimize the execution time to fit the user's requirements.
See how to use the optimized plug-in from the plug-in subpage.
Chroot functionality makes possible to use chroot environment with specific software to run the tests. This way a test case which needs specific software can be started at any OTS worker and a worker will stay clean of additional software. Chroot based testing is primarily targeted at executing tests with the Testability Driver framework.
Basically you can use any i386 chroot environment you like, but MeeGo Netbook edition is good starting point. First create an image with all packages you need for testing and then unpack and compress it to a tar.gz package:
mic-chroot --unpack-only –save-to=<chroot_directory> <image> cd <chroot_directory> tar -Pczf ../rootstrap.tar.gz .
Now you have a rootstrap ready in rootstrap.tar.gz file.
To trigger a chroot test you need to give two arguments for OTS trigger:
Example like this:
ots_trigger --server=192.168.1.1/xmlrpc --build_id=nightly_testing --image=http://url.to.image/image.tar.gz --sw_product=meego_n900 \ --chrootpackages=mwts-filesystem --rootstrap=http://url.to.rootstrap/rootstrap.tar.gz --email=my.name@company.com