Forum Discussion
When you say that your test fails, what do you mean? The reason I ask is that a failure in the test MAY be an error in the TestLog that is actually logged... OR it could be a syntax error in your test that causes the project to fail before it even attempts to write a test log.
If we could have a bit more info on the "failure", that would help... in the meantime, your code looks fine.
- Chi9 years agoOccasional Contributor
Hi Robert,
The test failure is a file comparison fail (I expected it to fail because I added the difference myself). It is this bit of code:
if (Files.CrashReport_config.Check(systemDrive + "\\ProgramData\\Company\\CrashReport.config"))
Log.Checkpoint("GID235250_InstallLogging: User Details are correctly written to C:\\ProgramData\\Company\\CrashReport.config");
else
Log.Error("GID235250_InstallLogging: User Details are NOT correctly written to C:\\ProgramData\\Company\\CrashReport.config");The Check returns false which produces the attached logs. Log1.jpg shows the Check method writing an Error to the log due to the file difference. Log2.jpg shows the file difference. Log3.jpg shows the test moving on to the next Test Item which is the SaveResultAs method.
From other tests which I have executed since my original post, I am able to get that SaveResultAs method to work in situations where I've encountered an error in a test and aborted that test due to my "Stop on error" setting. It appears it's this particular scenario with the file comparison that's not behaving properly.
Related Content
- 8 years ago
- 9 years ago
- 12 years ago
Recent Discussions
- 3 hours ago
- 10 hours ago
Working with Visual Test
Solved2 days ago