{"push_id":774041620,"size":1,"distinct_size":1,"ref":"refs/heads/save-last-used-frame-on-exception","head":"3366667ba10e73ea7d157a77707a434c33270957","before":"e521168a3ef0818774853d960f0f5ddae5494a42","commits":[{"sha":"3366667ba10e73ea7d157a77707a434c33270957","author":{"email":"37d41699bdee4fcb969ca499eb0f8b82c60d59cc@stb-tester.com","name":"William Manley"},"message":"stbt-run: Save last used frame on failure as screenshot.png\n\nstbt-run knows that a test has failed/errored if the test script raises\nan exception.  When `wait_for_match`, `wait_for_motion`, etc. fail\nthey attach the frame that caused the failure to the exception that they\nraise.  stbt-run is expecting this so can save the exception for later\ninspection and debugging.\n\nHowever: if users are using the more modern style of:\n\n    assert wait_until(lambda: match(...))\n\nthen the exception is raised by the assert, which has no knowledge of\nthe frame that caused the assert.  In this case `stbt batch run` will\ngrab a screenshot of whatever happens to be on screen when the test\nfinishes.  This screenshot often doesn't exhibit the issue that caused\nthe test to fail/error in the first place.\n\nThis commit makes the assumption that the last frame that the test script\nactually used is the one that exhibited the issue and saves that instead.","distinct":true,"url":"https://api.github.com/repos/wmanley/stb-tester/commits/3366667ba10e73ea7d157a77707a434c33270957"}]}