Q:

Automated web tests depending on developer code

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?

A:

I think you answered your own question in your question when you asserted "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."  Your automation would in effect not be testing anything, it would simply be exploring the happy path.
You should not use the app itself to drive your automated tests, but it is perfectly reasonable and expected to use data from the app for validation within the automated tests.  For instance, it is common practice to perform a test case and then compare results in the UI with results from the database or web service.

