Forum Discussion

hpdvs2's avatar
hpdvs2
Occasional Contributor
14 years ago

Get the test status in during the test

I would like to know the status of a test, before the test project has finished.



I'm planning on doing this by running a routine as the last step in all of my test cases.



Project["TestItems"]["Current"] - will give me the current test case, but I don't know how to get the status of previous steps.



****?????*****



How do I get the statuses of the steps that ran prior?  I.e.  if the worst returned a warning, then I would post to the database the status of Warning., and if multiple Failed, I would post failed.



At present, I am already reporting out when each test starts, and that is compared in the database against how long it took in previous runs, and estimates how much time is left to completion.  If I can get the status as it runs as well, that would be great.



If how I am asking for this is not possible, (I.e. run in the last step) is there a way to run a test immediately after the first test so I get report its feedback immediately?



Thanks.


1 Reply


  • Hello Dan,



    You can try using the following sample script.



    To get only an overall test run result, comment the following code:



    for(var i = 0; i < logData.childNodes.length; i++) {

      result += LogDataToText(logData.childNodes.item(i), indentIndex + 1, indentSymbol);

    }