blackboard / lambda-selenium

Use Selenium Webdriver and Chrome inside AWS Lambda
MIT License
229 stars 52 forks source link

Instantiate the test result for each invocation of the lambda #42

Closed hmcgowan closed 5 years ago

hmcgowan commented 5 years ago

If a lambda is pre-warmed, the next request can be contaminated with data from a previous run. This is noticeable where you have a lambda that runs a test and FAILs and then the next invocation of that same lambda runs a test later that is a PASS. That second call will actually fail because the TestResult#throwable field is still retaining the exception from the previous run.

So as it is on master, failing tests will always fail but sometimes passing tests will fail and show the exception of a test that previously failed on the lambda instance calling the handler.