cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naik, Archana" <>
Subject testcases timing out and report failures
Date Tue, 29 Oct 2013 17:24:56 GMT
Hi, Devs,

As part of fire-os porting, I updated mobile-spec to test the platform with all core plugins.
We observed many failures on running the automated cordova-mobile-spec tests with the 3.1
branch of amazon fireos port. Almost all the failures seen are timeout issues. Upon debugging
the issue we found that the success callbacks are always called but the Jasmine Framework
is not notified about the call and reports that the test failed due to timeout. However, with
our 3.0 branch all the tests passed with no timeout issues.

This is one of the tests where the above behavior is observed.

In filetransfer.spec.4, [File Transfer Automated Tests]

Code Snippet of test:

it("filetransfer.spec.4 should be able to download a file using http", function() {
           var fail = createDoNotCallSpy('downloadFail');
            var remoteFile = server + "/robots.txt"
            var localFileName = remoteFile.substring(remoteFile.lastIndexOf('/')+1);
            var lastProgressEvent = null;

            var downloadWin = jasmine.createSpy().andCallFake(function(entry) {

          // this.after(function() {
               // deleteFile(localFileName);
          //  });

           runs(function() {
                var ft = new FileTransfer();
                ft.onprogress = function(e) {
                    lastProgressEvent = e;
      , root.fullPath + "/" + localFileName, downloadWin,
            waitsForAny(downloadWin, fail);

We verified that the robots.txt file is actually downloaded [verified this by pulling the
file from the device and checking that the contents exist]. [Note: We commented the deleteFile()
functionality so that we don't delete the file after the test]. Additionally, we verified
that the success callback is called and all the checks(expect stmts) pass by adding console.log
statements to the downloadWin() function.

Any help would be appreciated.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message