Parameterized: fixing parameters by annotation type

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Parameterized: fixing parameters by annotation type

Lucas Ventura Carro
Hi,

As other references, I am using parameterized annotation [1] to combine
functional test suites by browser [2].
In other cases, I parameterize the tests by other variable, like database
systems.
But using "@Parameterized" is not as declarative and readable for this kind
of tests.
I was wondering on creating own annotations like "@Browsers" or
"@Databases", which would extend the parameterization functionality, and
returning the desired parameters (readed at runtime).

Does this seem a bad desing or a bad pattern for tests?
Is there any way of make this  parameterization more declarative than being
at the "@Parameters" method?

  [1]: https://github.com/junit-team/junit4/wiki/parameterized-tests
  [2]:
https://saucelabs.com/blog/parallel-junit-4-and-selenium-part-one-parameters

Thanks,
--
Lucas