Changes

Wpkg tests

1,547 bytes added, 12:04, 17 August 2009
no edit summary
(make sure you have administrator rights to install/remove the test applications):
> '''testall''' <suffix> ... all tests are run from test1 ... testn containing tests 1 ... 99
> '''testset''' testN_name <suffix> ... a test set is run, going through test 1 ... test 99
> '''testone''' testN_name testNumber <suffix> ... one single test is run
<suffix> is for having different versions of wpkg.js in the wpkg-test folder. Example:
creation/deletion of simple text files.
All '''test folder names ''' start with "test", followed by a number, an underscore and the short description of the tests.
Within a test folder, the '''tests are numbered from 1 ... 99''', where at least test number 99 must make sure, that all used test files / test packages are removed, so that the next test has a clean test machine.
One test consists of a config.xml, hosts.xml, profiles.xml and packages.xml as you can see in above directory structure. The tests '''must not influence the local wpkg.xml of the system''' (if such exists) so the test suite can be run at a system, which itself is part of another WPKG installation. By setting <param name='settings_file_path' value='.' /> in each config.xml, we make sure that the wpkg.xml in the wpkg-test/ folder is used. Please, use the config.xml of an existing test, if you create new tests, to ensure this. In the "checks.txt" files there should be a short description of each test:
[http://wpkg.svn.sourceforge.net/viewvc/wpkg/wpkg/wpkg-test/test1_dependencies/Checks.txt Test1: dependencies]
[http://wpkg.svn.sourceforge.net/viewvc/wpkg/wpkg/wpkg-test/test3_cmdsetup/Check.txt Test3: cmdsetup]
 
The '''compare''' folder is essential for getting information if the different tests succeed or failed. It contains the correct "wpkg.xml" which can be compared with the local wpkg.xml of the test run.
 
When we design a new test, e.g. ''test0815_mytest\38'', there is no ''compare\test0815_mytest\38\wpkg.xml'' file, so at first test run it is assumed that the created wpkg.xml is correct - it will be copied automatically to the ''compare'' folder.
 
=== Test run ===
 
'''testone'''.cmd
 
=== Invitation ===
 
Since Wpkg is getting more and more complex, tests for all possible situations/configurations/package checks etc. are essential.
 
So, I invite you to write tests for the test suite for all kinds of checks, so we can assure a good quality and backward compatibility for WPKG. Have a look at the existing tests
66
edits