Whenever, I run my automation test, it just shows completed, no matter the test is passed or failed. Please help me.
While performing automation testing with Selenium on LambdaTest Selenium Grid, you may face a scenario where a test that you declared as fail in your local instance may turn out to be completed successfully at LambdaTest. Don’t worry though! We understand how imperative it is to flag an automation test as either “pass” or “fail” depending upon your testing requirement with respect to the validation of expected behaviour.
If you wish to mark a test status as fail/pass at LambdaTest then you can do so by executing the below code:
- To mark test status to fail
driver.executeScript(‘lambda-status=failed’)
- To mark test status to pass .
driver.executeScript(‘lambda-status=passed’)
Hope this helps.
Hi @abhishek.sharma.gropse Where we need to write this details in code ? Is it in capabilities or quite method or utilities ?
Hi @pateltejas799 You can pass this right before the driver quit.
Please see sample here:
And further document here: Changing Individual Test Details | LambdaTest