android - Execute code if a test fails with py.test -


I am using UI Test Automation on Android. I want to be able to save a bug report after the test failed.

Is there any way that if a test has failed in my test code, can I save the bug report in Tidown after that?

Basically, I just wanted to save the bug report after each trial, but it is slightly more in adding 45 seconds to each test.

You can apply your code

> pytest_runtest_logreport in conftest.py like this:

  def pytest_runtest_logreport (report): if report. When == 'Call' and report.failed: # Save bug report   

For more information, see.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -