Answer the question
In order to leave comments, you need to log in
How to add new tests to PHPUnit right at runtime?
Hey!
I set up an environment for testers in the form of a bunch of phpunit + selenium (selenoid) . The idea of a simple "smoky" test came up - bypassing all active elements on the page and "clicking" on them in search of javascript and http status errors.
This test turned out in the form of a set of methods for collecting, bypassing links (in particular) and navigating through the page tree.
The entry point is, by default, a public method named `test*` , so all checks are obtained in one test, by multiple `assert` s. This is inconvenient, progress is not visible, and the number of errors is not visually clear in the reports - the first unsuccessful `assert`fails the entire test. It would be desirable to issue transition under each link in the form of the separate test.
Maybe someone solved a similar problem? `@dataProvider` is not suitable here, since it is executed BEFORE the tests start, and in the current case, the data occurs right during testing.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question