Testing The Untestable
Michael Durrant
Playwright enthusiast and Automation Architect with experience in unit, integrated and end-to-end automated testing for in healthcare, manufacturing and banking. Accessibility advocate for inclusive experiences.
A long time problem for automated end-to-end testing has been testing production systems that have no test system available for testing.
A classic example is payment systems and other financial endpoints. Other examples I have worked with include college admission systems, insurance company APIs, loan system endpoints and many local and federal government services that cannot afford or are unable to provide test systems you can use.
Traditionally end-to-end testing with Selenium did not provide simple ways to overcome this problem. This in turn, frequently leads to automation that is very limited in scope and/or require clunky manual intervention and/or manual testing. These challenges only grow when we try to run our test suites in CI systems which require full automation.
领英推荐
Modern approaches have now given us tools and knowledge on how to address this. A couple of solutions are shown below
An important part of a good solution will be to test at multiple levels. Given the above solutions involve mocking out live responses you should consider integration tests (if possible) to verify that production endpoints are still valid and of course a base of high coverage unit tests for actual functionality. You might also consider a few happy path smoke tests for production with sad cases covered in test systems. Production monitoring of live endpoints rather than going through brower UIs is another option to consider.