testkit-lite 2.2.5-1 testkit-lite-WW41release-2.2.5-1
authortestkit <testkit@elva-desktop.(none)>
Mon, 15 Oct 2012 13:34:58 +0000 (21:34 +0800)
committerLei Yang <lei.a.yang@intel.com>
Mon, 15 Oct 2012 13:34:58 +0000 (21:34 +0800)
- add BLOCK logic for webapi's result

ChangeLog
setup.cfg
setup.py
testkit-lite
web/index.html

index edec074..f291bea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+ Tue Oct 10 2012 Zhang Huihui <huihuix.zhang@intel.com> 2.2.5-1
+  - add BLOCK logic for webapi's result
  Tue Sep 29 2012 Zhang Huihui <huihuix.zhang@intel.com> 2.2.4-4
   - update pdf files
  Tue Sep 28 2012 Zhang Huihui <huihuix.zhang@intel.com> 2.2.4-3
index f5467b6..cbfb5a2 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,13 +2,15 @@
 install-scripts = /usr/bin
 install-lib = /usr/lib/python2.7/site-packages
 [bdist_rpm]
-release = 4
+release = 1
 packager = huihuix.zhang@intel.com
 requires = python
 pre_install = preinstall
 install_script = fakeinstall
 post_install = postinstall
-changelog = * Tue Sep 29 2012 Zhang Huihui <huihuix.zhang@intel.com> 2.2.4-4
+changelog = * Tue Oct 10 2012 Zhang Huihui <huihuix.zhang@intel.com> 2.2.5-1
+  - add BLOCK logic for webapi's result
+ Tue Sep 29 2012 Zhang Huihui <huihuix.zhang@intel.com> 2.2.4-4
   - update pdf files
  Tue Sep 28 2012 Zhang Huihui <huihuix.zhang@intel.com> 2.2.4-3
   - add Known Issues section in README
index 0c8c79d..e51cfbd 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -39,7 +39,7 @@ else:
 
 setup(name='testkit-lite',
       description='command line test execution framework',
-      version='2.2.4',
+      version='2.2.5',
       long_description='',
       author='Zhang, Huihui',
       author_email='huihuix.zhang@intel.com',
index 489643e..6f232ec 100755 (executable)
@@ -96,7 +96,7 @@ except Exception, e:
 
 # detect version option
 if "--version" in sys.argv:
-    print "[ testkit-lite v2.2.4-4 ]"
+    print "[ testkit-lite v2.2.5-1 ]"
     sys.exit(1)
 
 #get test engine, now we only got default engine
@@ -181,7 +181,8 @@ Note: \n\
           2) TestLog is stored to %s/latest\n\
           3) %%prog enables both auto and manual tests by default\n\
           4) Obviously -A and -M are conflict options\n\
-          5) -e option does not support -D mode" % (LOG_DIR)
+          5) -e option does not support -D mode\n\
+          6) The test cases' order in the result files might be arbitrary, when running same tests.xml with same options. This is caused by python's API 'getiterator' from module 'xml.etree.ElementTree'" % (LOG_DIR)
     except:
         usage = None
 
index 47a59cc..cc0cfdd 100644 (file)
@@ -55,7 +55,7 @@
        var last_test_page = "";
        var current_page_uri = "";
 
-        var activetest = true;
+       var activetest = true;
 
        var manualcases = function() {
                this.casesid = "";
                if (runTime < timeout)
                        setTimeout("CheckResult()", pollTime);
                else
-                       report('FAIL', "Test time out");
+                       // timeout, set result to BLOCK
+                       report('BLOCK', "Test time out");
        }
 
        function CheckResult() {
                                                        for (i = 0; i < fails.length; i++) {
                                                                var desccell = fails[i].childNodes[1];
                                                                if (desccell)
-                                                                       message += "###Test###"
-                                                                                       + desccell.innerText;
+                                                                       message += "###Test Start###"
+                                                                                       + desccell.innerText
+                                                                                       + "###Test End###";
                                                                var msgcell = fails[i].childNodes[2];
                                                                if (msgcell)
-                                                                       message += "###Error###"
-                                                                                       + msgcell.innerText;
+                                                                       message += "###Error1 Start###"
+                                                                                       + msgcell.innerText
+                                                                                       + "###Error1 End###";
                                                        }
-
                                                        report('FAIL', message);
                                                }
                                        } else if (locator_key == "test_name") {
                                                for (i = 0; i < fails.length; i++) {
                                                        var desccell = fails[i].childNodes[1];
                                                        if (desccell)
-                                                               message += "###Test###" + desccell.innerText;
+                                                               message += "###Test Start###"
+                                                                               + desccell.innerText + "###Test End###";
                                                        var msgcell = fails[i].childNodes[2];
                                                        if (msgcell)
-                                                               message += "###Error###" + msgcell.innerText;
+                                                               message += "###Error2 Start###"
+                                                                               + msgcell.innerText
+                                                                               + "###Error2 End###";
                                                }
                                        }
                                        report('FAIL', message);
                                                                else
                                                                        report('FAIL', otxt.trim());
                                                        } else
-                                                               report('FAIL', 'No body tag');
+                                                               report('BLOCK', 'No body tag');
                                                },
                                                error : function() {
                                                        check_timeout();
                        } else
                                check_timeout(); // not complete
                } catch (e) {
-                       report('FAIL', message);
+                       report('BLOCK', message);
                }
        }
 
 
                iTest++;
 
-                //alert("Reporting result:" + result + "; and if continue testing:" + activetest);
-                if(activetest){
-                   doTest();
-                }else{
-                    activetest = true;
-                }
+               //alert("Reporting result:" + result + "; and if continue testing:" + activetest);
+               if (activetest) {
+                       doTest();
+               } else {
+                       activetest = true;
+               }
        }
 
        function doTest() {
                                test_page = current_page_uri;
 
                        // Don't load the same test page again
-                        //alert("Testing page: " + test_page + "; Previous_page: " + last_test_page);
-                        //alert("No: " + iTest);
-                       if (test_page == last_test_page){
-                               activetest = false;
-                               //alert("Continue:" + activetest);
-                               CheckResult();
-                               continue;
-                        }
+                       //alert("Testing page: " + test_page + "; Previous_page: " + last_test_page);
+                       //alert("No: " + iTest);
+                       if (test_page == last_test_page) {
+                               activetest = false;
+                               //alert("Continue:" + activetest);
+                               CheckResult();
+                               continue;
+                       }
 
                        if ((current_page_uri.indexOf("2DTransforms") != -1)
                                        || (current_page_uri.indexOf("3DTransforms") != -1)) {
                        }
                        oTestFrame.src = current_page_uri;
                        last_test_page = test_page;
-                        //alert("Prepare onload.collback");
-                        if (oTestFrame.attachEvent){
-                             oTestFrame.attachEvent("onload", function(){
-                                CheckResult();
-                             });
-                        } else {
-                             oTestFrame.onload = function(){
-                                CheckResult();
-                             };
-                        } 
+                       //alert("Prepare onload.collback");
+                       if (oTestFrame.attachEvent) {
+                               oTestFrame.attachEvent("onload", function() {
+                                       CheckResult();
+                               });
+                       } else {
+                               oTestFrame.onload = function() {
+                                       CheckResult();
+                               };
+                       }
 
                        return;
-                    
+
                }
 
                doManualTest();