From: liuct Date: Wed, 13 Aug 2014 03:25:52 +0000 (+0800) Subject: fix debian build issue, add missed data file X-Git-Tag: upstream/3.1.7~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d30b8bcd5d14b913e2e97fd1980e2e990ed65550;p=test%2Ftools%2Ftestkit-lite.git fix debian build issue, add missed data file --- diff --git a/README b/README new file mode 100644 index 0000000..45e3f69 --- /dev/null +++ b/README @@ -0,0 +1,134 @@ +Dependency: +================= +1. python2.7 + +2. python-setuptools python-support python-pip + + Ubuntu + + sudo apt-get install python-setuptools python-support python-pip + + Fedora(RHEL) + + sudo yum install python-setuptools python-support python-pip + + openSUSE(TIZEN) + + sudo zypper install python-setuptools python-support python-pip + + + +3. python-requests(>=1.1), use pip to install it + + sudo pip install requests + +How to build debian package: +================= +Host with Ubuntu OS recommended. Run the command below to build from source code and get debian package: + + dpkg-buildpackage + + +How to build RPM package: +================= +Host with Fedora OS recommended. Run the command below to build from source code and get rpm package: + + make -C packaging/ + rpmbuild -tb packaging/testkit-lite_.tar.gz --nodeps + +Host with ubuntu OS, we need to add a workaround to support the rpm build + + rpmbuild --define 'python_sitelib /usr/lib/python2.7/site-packages' -tb packaging/testkit-lite_.tar.gz --nodeps + +How to install: +================= +Install testkit lite from source code: + + sudo python setup.py install --record /var/log/testkit-lite.files + +Install testkit lite from debian build: + + sudo dpkg -i ../testkit-lite__all.deb + +How to uninstall: +================= +Uninstall testkit-lite installed with 'setup.py install': + + cat /var/log/testkit-lite.files | sudo xargs rm -rf + +Uninstall testkit-lite installed with 'debian': + + sudo dpkg -r testkit-lite + +How to use: +================= +1) You can run case on target: +For web test cases: + + testkit-lite -f device:"//tests.xml" -e 'WRTLauncher ' + +For native test cases: + + testkit-lite -f device:"//tests.xml" + +2) You can run case in single mode : +For web test cases: + + testkit-lite -f "//tests.xml" -e 'WRTLauncher ' --comm localhost + +For native test cases: + + testkit-lite -f "//tests.xml" --comm localhost + +3) You can select on parser engine to simply conduct one or more tests.xml on target: + + testkit-lite -f device:"//tests.xml ... //tests.xml" -e 'WRTLauncher ... ' + +4) If you want to execute both auto and manual tests: + + testkit-lite -f device:"//tests.xml" + +5) If you just want to execute manual tests: + + testkit-lite -f device:"//tests.xml" -M + +6) If you just want to execute auto tests: + + testkit-lite -f device:"//tests.xml" -A + +7) If you want to save test result to another file, by default it'll be under /opt/testkit/lite/latest: + + testkit-lite -f device:"//tests.xml" -o /xxx.xml + +8) If you want to choose some filters: + + testkit-lite -f device:"//tests.xml" --status level1 --type type1 ... + +9) If you want to run test according capability: + + testkit-lite -f device:"//tests.xml" --capability capability.xml + +10) At last, you can freely compose the above parameters together: + + testkit-lite -f /tests.xml /tests.xml -A --priority P1 --type type1 ... + +Get Results: +================= +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. + +View Results: +================= + +Test report can be viewed in HTML format, so the data in the xml result file looks more human friendly. + +Please follow the following steps to view test report: + + 1) copy files: application.js back_top.png jquery.min.js testresult.xsl tests.css under directory /opt/testkit/lite/xsd/ + + 2) put the files from step 1) under the same directory as the xml result file + + 3) open xml result file with a web browser(IE, Chrome or Firefox) + +Known Issues: +================= +N/A diff --git a/resource/mh.html b/resource/mh.html new file mode 100644 index 0000000..01632b7 --- /dev/null +++ b/resource/mh.html @@ -0,0 +1,76 @@ + + +Web Manual Test Harness + + + + + +
+ + +
+
+ + + + +
+
+ + + + +
+
+
Test Entry: http://www.baidu.com
+
Refer Test Entry: http://www.sina.com
+
+ +
+
+ + diff --git a/setup.py b/setup.py index a32b296..e51e76c 100644 --- a/setup.py +++ b/setup.py @@ -44,6 +44,7 @@ setup( include_package_data = True, data_files = [('/opt/testkit/lite', ['VERSION', 'doc/testkit-lite_user_guide.pdf', 'doc/testkit-lite_tutorial.pdf', 'doc/test_definition_schema.pdf']), ('/opt/testkit/lite/commodule/', ['CONFIG']), + ('/opt/testkit/lite', ['resource/mh.html']), ('/etc/dbus-1/system.d/', ['dbus/com.intel.testkit.conf'])], scripts = ('testkit-lite', 'dbus/testkit-lite-dbus'), packages = find_packages(), diff --git a/testkitlite/engines/mh.html b/testkitlite/engines/mh.html deleted file mode 100644 index 01632b7..0000000 --- a/testkitlite/engines/mh.html +++ /dev/null @@ -1,76 +0,0 @@ - - -Web Manual Test Harness - - - - - -
- - -
-
- - - - -
-
- - - - -
-
-
Test Entry: http://www.baidu.com
-
Refer Test Entry: http://www.sina.com
-
- -
-
- - diff --git a/testkitlite/engines/test_executer.py b/testkitlite/engines/test_executer.py index bda80a5..9b357e5 100644 --- a/testkitlite/engines/test_executer.py +++ b/testkitlite/engines/test_executer.py @@ -27,7 +27,7 @@ STR_FAIL = 'FAIL' STR_BLOCK = 'BLOCK' STR_NOTRUN = 'n/a' DEFAULT_WD_URL = 'http://127.0.0.1:9515' -MH_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "mh.html") +MH_FILE = "/opt/testkit/lite/mh.html" class TestExecuter: