junit4 parameterized test using VertxUnitRunner

187 views
Skip to first unread message

Simon Gemmell

unread,
May 24, 2015, 11:26:34 PM5/24/15
to ve...@googlegroups.com
Hello,

Is it possible to do parameterized testing using vertx3, junit4 and @RunWith(VertxUnitRunner.class)?

Regards,
Simon

Julien Viet

unread,
May 25, 2015, 2:25:31 AM5/25/15
to ve...@googlegroups.com, Simon Gemmell
hello

I don’t think that is possible as the runners are exclusive, so you would need to come with a manual solution for parameterizing tests.

-- 
Julien Viet
www.julienviet.com
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Julien Viet

unread,
May 25, 2015, 7:55:17 AM5/25/15
to ve...@googlegroups.com, Simon Gemmell
so good news, since junit 4.12 it is possible to accomodate parameter runner, I will come up with a solution in vertx-unit modeled after : http://www.stacktheoverflow.com/questions/27745691/how-to-combine-runwith-with-runwithparameterized-class


-- 
Julien Viet
www.julienviet.com

Simon Gemmell

unread,
May 25, 2015, 8:27:01 AM5/25/15
to ve...@googlegroups.com, simong...@gmail.com
Great news. It is useful for data driven testing of vertx interfaces.

Julien Viet

unread,
May 25, 2015, 8:32:27 AM5/25/15
to ve...@googlegroups.com, Simon Gemmell, simong...@gmail.com
fortunately, they (the people behind parameterized test feature) recognized that there are many runners (like Vert.x) and the parameterized testing is a orthogonal feature.

I implemented it and pushed it in Vert.x Unit master, here is an example:


 if you can try it on your side it would be great.

-- 
Julien Viet
www.julienviet.com
Reply all
Reply to author
Forward
0 new messages