fix importing issue of selenium
[test/tools/testkit-lite.git] / README.md
1 ## Dependency:
2
3 1. python2.7
4 2. python-setuptools python-support python-pip
5    1. Ubuntu
6       `sudo apt-get install python-setuptools python-support python-pip`
7    2. Fedora(RHEL)
8       `sudo yum install python-setuptools python-support python-pip`
9    3. openSUSE(TIZEN)
10       `sudo zypper install python-setuptools python-support python-pip`
11 3. python-requests(>=1.1)
12    `sudo pip install requests`
13
14 ## How to build Debian package:
15
16 Host with Ubuntu OS recommended.
17
18 Run the command below to build from source code and get Debian package:
19
20 `dpkg-buildpackage`
21
22 ## How to build RPM package:
23
24 Host with Fedora OS recommended.
25
26 Run the command below to build from source code and get RPM package:
27
28 ```
29 make -C packaging/
30 rpmbuild -tb packaging/testkit-lite_<version>.tar.gz --nodeps
31 ```
32
33 Host with Ubuntu OS, we need to add a workaround to support the RPM build:
34
35 `rpmbuild --define 'python_sitelib /usr/lib/python2.7/site-packages' -tb packaging/testkit-lite_<version>.tar.gz --nodeps`
36
37 ## How to install:
38
39 Install testkit lite from source code:
40
41 `sudo python setup.py install --record /var/log/testkit-lite.files`
42
43 Install testkit lite from debian build:
44
45 `sudo dpkg -i ../testkit-lite_<version>_all.deb`
46
47 ## How to uninstall:
48
49 Uninstall testkit-lite installed with `setup.py install`:
50
51 `cat /var/log/testkit-lite.files | sudo xargs rm -rf`
52
53 Uninstall testkit-lite installed with `debian`:
54
55 `sudo dpkg -r testkit-lite`
56
57 ## How to use:
58
59 1. You can run case on target:
60    1. For web test cases:
61
62    `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" -e 'WRTLauncher <package_name>'`
63
64    2. For native test cases:
65
66      `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml"`
67
68 2. You can run case in single mode :
69    1. For web test cases:
70
71       `testkit-lite -f "<somewhere>/<package_name>/tests.xml" -e 'WRTLauncher <package_name>' --comm localhost`
72
73    2. For native test cases:
74
75       `testkit-lite -f "<somewhere>/<package_name>/tests.xml" --comm localhost`
76
77 3. You can select on parser engine to simply conduct one or more `tests.xml` on target:
78
79    `testkit-lite -f device:"<somewhere>/<package_name1>/tests.xml ... <somewhere>/<package_namen>/tests.xml" -e 'WRTLauncher <package_name1> ... <package_namen>'`
80
81 4. If you want to execute both auto and manual tests:
82
83    `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml"`
84
85 5. If you just want to execute manual tests:
86
87    `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" -M`
88
89 6. If you just want to execute auto tests:
90
91    `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" -A`
92
93 7. If you want to save test result to another file, by default it'll be under `/opt/testkit/lite/latest`:
94
95    `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" -o <somewhere>/xxx.xml`
96
97 8. If you want to choose some filters:
98
99    `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" --status level1 --type type1 ...`
100
101 9. If you want to run test according capability:
102
103    `testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" --capability capability.xml`
104
105 10. At last, you can freely compose the above parameters together:
106
107     `testkit-lite -f <somewhere1>/tests.xml <somewhere2>/tests.xml -A --priority P1 --type type1 ...`
108
109 ## Get Results:
110
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`.
112
113 ## View Results:
114
115 Test report can be viewed in HTML format, so the data in the xml result file looks more human friendly.
116
117 Please follow the following steps to view test report:
118
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)
122
123 ## Known Issues:
124
125 N/A