When QAs write automated selenium tests to test a multi-layered website (e.g. testing a web app which is on mvs design, spring and database) should the tests make use of existing classes and frameworks written by developers or should we write simplified classes to serve the test?
The downside of relying of frameworks developed by devs, is if there is a logical error in the framework it will be present in the tests.
a typical example is a class that fetches some links form a database and some framework printing them on the webpage.
If the tests rely on the framework to define the expected results and then verify them against the output on the webpage, then if the logic in the framework is incorrect, then the defined expected results will also be incorrect and there is a risk that the tests will pass even though the results are wrong.
In my opinion, the automated system tests written by QA should be independet on the underlying framework where as the automated unit tests should rely on the underlying framework.
What are your thoughts?