Scenario: I have a repository that contains a component which is reused across multiple different projects. The component in question is a
image viewer component.
3 Products will use this image viewer for displaying image(s) in their respective web applications. I am tasked to create some end2end / gui functional automated tests for the component itself and have been asked to try and make sure we don't have to write automated tests to cover it in each product which implements it.
my initial thoughts are:
- Write some automated tests in the component repository, which spins up an environment running the component standalone and executes the tests.
- A large degree of the task is somewhat flawed, each product will have different tests regarding the
image viewer, the steps taken to launch it with an image will be vastly different, so there will be repetitive code and tests there per product
- Deploying the component stand alone is not really an end2end or integration test because it is not consumed or used by anything under test at that point, we would still need to test it in each individual product once it has been implemented.
How can I best approach this problem to generate reusable tests, what should I advise or discuss with my manager regarding the task at hand?
The stack used would be, java/c# selenium based tests, the component is written in typescript.