Forum Discussion

florentinach's avatar
florentinach
Occasional Contributor
10 years ago
Solved

Test Items result is failed, when the tests are passed

Hello,

 

I'm using Test Complete 9 and I want to run a list of test items. I have declared all tests that I want to run as you can see in the screenshot attached.TestItems.jpg

 

The problem is that, after running all the tests items defined, I have the result that one of my test was failing. Looking at the test details, I see that the test was, in fact, passed. I investigated the problem, but is not comming from my code. See the mht screenshot file attached.

 

The command that i'm running is:
set WORKSPACE=C:\hudson\workspace\ul-desk-testcomplete-HEAD\qa\desk
"C:\Program Files (x86)\SmartBear\TestExecute 9\Bin\TestExecute.exe" "%WORKSPACE%\ULDeskV3.pjs" /run /project:ULDeskV3 /exit /ExportLog:"%WORKSPACE%\Log\AllTestsReport.mht"

Can you please help me, to identify the root cause of my issue, why the tests is failing when is passed? Sometimes this test case is passed, sometimes is failing.

AllTestResults1.jpg

 

 

 

  • Marsha_R's avatar
    Marsha_R
    10 years ago

    Right, the second error is no longer displayed because you turned it off.

     

    Now you've given us another piece of information, that different tests fail at different times but give the same error. My guess would be that you have some similar code at the beginning of each these tests that's timing out or failing some other way and then restarting.  

     

    If you'd like to post the first few lines of code of a couple of the failed tests, perhaps we can help you figure it out.

9 Replies

  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor

    You can produce similar logs simply by stopping script execution with the stop button.

    Because no error was actually logged within that script the scripts result is a "pass" while the overall test result is a fail.

     

    Not to be Captain Obvious here, but according to your log file the "ST_SCR01_LoginScreen" script failed to start.

    "The element to be run specified in the 'ST_SCR01_LoginScreen' test item failed to run."

    Does the referenced script for this test item actually exist or was it possibly renamed?

    • florentinach's avatar
      florentinach
      Occasional Contributor

      Hello,

       

      My test item ST_SCR01_LoginScreen exist, was not renamed, and did not fail to run (run successfully).

      ST_SCR01_LoginScript.png

       

       

      Sometimes the status of this test is passed, sometimes is failed. If you have any other suggestion, please let me know

      • florentinach's avatar
        florentinach
        Occasional Contributor

        If I stop the script execution with the stop button, I will have the message that the script stop to run, or the script was interrupted or an unexpected error occurred. But as you can see from my previous image attached, the script run successfully (I have the message: "The status of this test case is Pass") and on stop event function of my script, the platform was closed without any error otherwise the status of the test case will be set to fail.