Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screenshots should be saved regardless of whether the test is successful #35

Closed
cchan opened this issue May 16, 2016 · 2 comments
Closed
Labels
enhancement Making things better

Comments

@cchan
Copy link

cchan commented May 16, 2016

If the whole Selenium CSS selection thing still works, but we broke something critical in the UI appearance, then it's practically impossible to reliably automatically test this, but the screenshot can indicate what was on the screen at that time in that browser.

(This might be better solved by just opening it up and interacting with the interface yourself in a browser, but for the sake of completeness it really feels like screenshots should be saved always.)

@mdmintz
Copy link
Member

mdmintz commented May 16, 2016

There's the save_screenshot() method to save screenshots at times other than test failures. A failure is a natural place to have a screenshot taken automatically because that's when something went wrong. Otherwise, there'd be no way to know where to have them. If you take a screenshot after every single action like a click, it's going to take up a lot of unnecessary disk space. And even then, you might not know that anything was wrong unless you looked through all the screenshots. The real problem here is the reason behind why I created MasterQA https://github.com/mdmintz/MasterQA . It's for when you want human eyes to look at something, but still have automation do all the heavy lifting so that manual QA time is minimized. Check out that repo to see for yourself.

@mdmintz mdmintz closed this as completed May 16, 2016
@mdmintz mdmintz added the enhancement Making things better label Aug 27, 2023
@mdmintz
Copy link
Member

mdmintz commented Aug 27, 2023

Hi @cchan, you can add --ss as a pytest command-line option to save a screenshot after every test that runs!

pytest --ss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Making things better
Projects
None yet
Development

No branches or pull requests

2 participants