Forum Discussion
tarleaa
14 years agoContributor
Hello Alex,
That approach to repeat a certain test item if errors are found in the main log was the first approach I tried when I started using TC. But as I understand, this cannot be implemented in JScript due to some problems with scripts communicating with each other, maybe some language limitation or something (this was the conclusion from a topic started about 10 months ago I think)
So I picked another approach, which is not so elegant.
In every script that is prone to error I have the following code:
function test()
{
var ErrCount = Log.ErrCount;
..........[script execution]
if((Log.ErrCount > ErrCount) {
//re execute current script
}
}
This happens for the current test item, and it runs a maximum of 3 times.
What I was looking for was a method that in case an error was posted to the log after the fist running attempt, before the second attempt on running the test was started, the log for the current test item to be deleted so that at the end of the test, in case that the 2nd or 3rd run was successful, the error messages from the 1st run not to be displayed, thus affecting the main log, although the test item (at the 2nd or 3rd execution) was successful.
Am I making sense?
That is why I could use such a feature of TC, so that between 2 runs of the test item, the temp log for that specific test item to be deleted / erased and started a new one.
That approach to repeat a certain test item if errors are found in the main log was the first approach I tried when I started using TC. But as I understand, this cannot be implemented in JScript due to some problems with scripts communicating with each other, maybe some language limitation or something (this was the conclusion from a topic started about 10 months ago I think)
So I picked another approach, which is not so elegant.
In every script that is prone to error I have the following code:
function test()
{
var ErrCount = Log.ErrCount;
..........[script execution]
if((Log.ErrCount > ErrCount) {
//re execute current script
}
}
This happens for the current test item, and it runs a maximum of 3 times.
What I was looking for was a method that in case an error was posted to the log after the fist running attempt, before the second attempt on running the test was started, the log for the current test item to be deleted so that at the end of the test, in case that the 2nd or 3rd run was successful, the error messages from the 1st run not to be displayed, thus affecting the main log, although the test item (at the 2nd or 3rd execution) was successful.
Am I making sense?
That is why I could use such a feature of TC, so that between 2 runs of the test item, the temp log for that specific test item to be deleted / erased and started a new one.
Related Content
Recent Discussions
- 26 minutes agoSlickRick
- 2 hours agoSlickRick
Name Mapping Issue
Solved4 hours agokgreger1