Scope of Log.SaveResultAs
I have a single ProjectSuite that contains a single Project.
I re-use the scripts 3 times, it's the same scripts but the TestedApp changes slightly.
For that I use 3 folders in Projects\TestItems.
At the end of each TestedApp I export the Logs with the following script :
Log.SaveResultsAs(Rapport, 2, true, 0);
My problem is that when I use Log.SaveResultsAs(Rapport, 2, true, 0); I have for the first folder the correct Log, but in the second one I have the first and the second, and for the third folder I have all the logs.
First log : Log folder 1
Second log : Log folder 1 + Log folder 2
Third log : Log folder 1 + Log folder 2 + Log folder 3
So I tried to changed the scope of the SaveResult. I tried Log.SaveResultsAs(Rapport, 2, true, 1) and for all the 3 TestedApp it always returns to me the first TestedApp report (the first folder).
At worst, I will use the first case, but it would waste disk space.
Anyone could help please ?
If it's a single test run, then what you described is correct behavior. Log.SaveResultsAs saves what is in the log at that time. So, it will save EVERYTHING up to that point.
Try setting that fourth parameters to 2, to export only the current test item since that's how you have things laid out.... since each TestedApp is configured within a different Test Item, you should get 3 different logs.
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
I tried that but it only exports the current test item which is just the last test item of the group of tests that is the tested app's tests items...
Since I don't have any clue I'll keep the scope as large as I could, I will have garbage but at least I have my informations.