TestProject Forum

OpenSDK How to report test success

Using OpenSDK, if an exception is thrown during driver.FindElement() then that step is recorded in the report as “Failed”.

The entire test is then reported as “Failed” even if I use
driver.Report().Test(“My First Test”, true);
using “true” to indicate the test passed.

Am I doing something wrong?


Hello @testproject3
You need to first disable the automatic test report, then once you use the manual test report, it will use your report and not the automatic one.

To disable automatic test report:

Then at the end of your test, add
driver.Report().Test(“My First Test”, true);

Thanks Ran,

That got me part-way there.

Turns out I also needed to disable Command Reports as any failure of a command seems to be reported as the whole test is failing. So I now have this code which does what I want.



    Driver.Report().Test("My First Test", true);`