4 2. python-setuptools python-support python-pip
6 `sudo apt-get install python-setuptools python-support python-pip`
8 `sudo yum install python-setuptools python-support python-pip`
10 `sudo zypper install python-setuptools python-support python-pip`
11 3. python-requests(>=1.1)
12 `sudo pip install requests`
14 ## How to build Debian package:
16 Host with Ubuntu OS recommended.
18 Run the command below to build from source code and get Debian package:
22 ## How to build RPM package:
24 Host with Fedora OS recommended.
26 Run the command below to build from source code and get RPM package:
30 rpmbuild -tb packaging/testkit-lite_<version>.tar.gz --nodeps
33 Host with Ubuntu OS, we need to add a workaround to support the RPM build:
35 `rpmbuild --define 'python_sitelib /usr/lib/python2.7/site-packages' -tb packaging/testkit-lite_<version>.tar.gz --nodeps`
39 Install testkit lite from source code:
41 `sudo python setup.py install --record /var/log/testkit-lite.files`
43 Install testkit lite from debian build:
45 `sudo dpkg -i ../testkit-lite_<version>_all.deb`
49 Uninstall testkit-lite installed with `setup.py install`:
51 `cat /var/log/testkit-lite.files | sudo xargs rm -rf`
53 Uninstall testkit-lite installed with `debian`:
55 `sudo dpkg -r testkit-lite`
59 1. You can run case on target:
60 1. For web test cases:
62 `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" -e 'WRTLauncher <package_name>'`
64 2. For native test cases:
66 `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml"`
68 2. You can run case in single mode :
69 1. For web test cases:
71 `testkit-lite -f "<somewhere>/<package_name>/tests.xml" -e 'WRTLauncher <package_name>' --comm localhost`
73 2. For native test cases:
75 `testkit-lite -f "<somewhere>/<package_name>/tests.xml" --comm localhost`
77 3. You can select on parser engine to simply conduct one or more `tests.xml` on target:
79 `testkit-lite -f device:"<somewhere>/<package_name1>/tests.xml ... <somewhere>/<package_namen>/tests.xml" -e 'WRTLauncher <package_name1> ... <package_namen>'`
81 4. If you want to execute both auto and manual tests:
83 `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml"`
85 5. If you just want to execute manual tests:
87 `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" -M`
89 6. If you just want to execute auto tests:
91 `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" -A`
93 7. If you want to save test result to another file, by default it'll be under `/opt/testkit/lite/latest`:
95 `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" -o <somewhere>/xxx.xml`
97 8. If you want to choose some filters:
99 `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" --status level1 --type type1 ...`
101 9. If you want to run test according capability:
103 `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" --capability capability.xml`
105 10. At last, you can freely compose the above parameters together:
107 `testkit-lite -f <somewhere1>/tests.xml <somewhere2>/tests.xml -A --priority P1 --type type1 ...`
111 Test report will be generated as tests.result.xml.The result will be under `/opt/testkit/lite/latest` after execution, you can also check the history results in `/opt/testkit/lite/yyyy-mm-dd-HH:MM:SS.NNNNNN`.
115 Test report can be viewed in HTML format, so the data in the xml result file looks more human friendly.
117 Please follow the following steps to view test report:
119 1. Copy files: `application.js back_top.png jquery.min.js testresult.xsl tests.css` under directory `/opt/testkit/lite/xsd/`
120 2. Put the files from step 1) under the same directory as the xml result file
121 3. Open xml result file with a web browser(IE, Chrome or Firefox)