Parameterized tests

442 views
Skip to first unread message

Алексей Крутилко

unread,
Mar 3, 2015, 3:33:02 AM3/3/15
to thucydid...@googlegroups.com
Hi! In Thucydides we have ThucydidesParameterizedRunner, but as i see 2 problem:

1. We cannot use unique collection of parameters for each testmethod in testclass.
For example i have 2 testmethods which testing geometrical figure, first test acute-angled and have parameters squar, rectangle etc. second - round (circle, oval ...). 
Right now, i need to separate this test to different classes. Can you improve something like this https://github.com/Pragmatists/junitparams or another userfrendly parametrizer for jUnit?

2. With ThucydidesParameterizedRunner i cannot run single test from class, for example i have 10 tests in class, if i run single test i get somthing like this:
java.lang.Exception: No tests found matching Method test1(com.mytests.TestClass) from org.junit.internal.requests.ClassRequest@50337ff4
at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:35)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
Its ok, if i run all class. But it is inconvenient if i have a lot of testmethods in one class.

John Smart

unread,
Mar 3, 2015, 7:10:47 PM3/3/15
to Алексей Крутилко, thucydid...@googlegroups.com
Hi Алексей,

The ThucydidesParameterizedRunner is an extension of the old JUnit Parameterized runner, and all of the limits you describe are limits of the JUnit parameterized tests, so Serenity can't really do much about them. JUnitParams is indeed awesome. As this is an Open Source project, feel free to take a look at how it is written if you would like to adapt the JUnitParams runner to work with Serenity - pull requests are always welcome!

- John.

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
___________________________________________________
John Smart | Wakaleo Consulting  |  +61 407 247 642
Optimizing your software development process
http://www.wakaleo.com  |  john....@wakaleo.com
___________________________________________________

The dates for the 2014 BDD workshops have been scheduled! Check out our upcoming BDD/TDD Master classes and our Advanced BDD Requirements Workshops, coming soon to Sydney and Melbourne!
___________________________________________________
Reply all
Reply to author
Forward
0 new messages