Hi! Alternativly, use getData methods in CSVParametrized form the unofficialjunit project in sourceforge. Cheers, Georg...
23851
David Saff
saffatgoogle
Apr 23, 2012 7:30 pm
Dawid, Imagine a developer being dropped into a new project. There are JUnit tests using custom runners she's never seen, and some of those are failing. She'd...
23852
Dawid Weiss
dawid.weiss@...
Apr 23, 2012 7:44 pm
... Like I mentioned I can understand this rationale but I still differ in opinion. If there are custom runners that fail to comply with @Ignore contract they...
23853
David Saff
saffatgoogle
Apr 23, 2012 8:11 pm
... Ah, I'd forgotten that you wanted a description of all the contents. Does your scheme allow you to use a RunnerBuilder other than the default ...
23854
Dawid Weiss
dawid.weiss@...
Apr 23, 2012 8:29 pm
... See, that's the problem -- I have no control over what the use case of invoking the suite class is. It can be invoked from Ant, Eclipse or somewhere else....
23855
David Saff
saffatgoogle
Apr 23, 2012 9:02 pm
So, with an extra suite-wrapping step, you can use whatever ordering of builders you want: @RunWith(MyCustomBuiltSuite.class) ...
23856
Dawid Weiss
dawid.weiss@...
Apr 23, 2012 9:14 pm
... they get upset at every spurious keystroke (even at the @Test annotation). That's fine, thanks for trying to help, David. I'll just live with this behavior...
23857
Patricia
patricia_e_m...
Apr 25, 2012 10:27 pm
Hi :) I'm working on a project for university, which is about a website to teach the basics of Java programming. It'll have some programming lessons and then...
23858
Malte Finsterwalder
maltefinster...
Apr 26, 2012 7:17 am
That's a very general question. JUnit does not do much more than execute a bunch of tests and give you assertions to test. (It does give you some more "fancy"...
23859
yaswanth
spartonking478
Apr 26, 2012 1:53 pm
Hi All, I am new to junit. I am confused how to run the parameterized method. Ex: @Test public void add(int a,int b){ System.out.println("Result = "+(a+b)); } ...
23860
David M
jokerdmgmail
Apr 26, 2012 8:06 pm
"Must" read this: http://www.mkyong.com/unittest/junit-4-tutorial-6-parameterized-test/ It´s a good and simple explain by example. Greetings -- M.P.7.O. ...
23861
Colin Vipurs
zodiac_zx6
Apr 26, 2012 8:06 pm
You need to use the ParameterizedTestRunner. Here's a blog on how to do that: https://blogs.oracle.com/jacobc/entry/parameterized_unit_tests_with_junit ... -- ...
23862
Pete
tenorsaxman11
Apr 26, 2012 9:56 pm
I need to have Selenium Webdriver take a screenshot if the test failed, prior to closing the driver during teardown. Various attempts I've read about have not...
23863
Michael
mfeher00
Apr 26, 2012 9:56 pm
Hi all, Please bear with me as I'm getting back into JUnit after first using it several years ago. I see all the discussions going on and they are far beyond...
23864
Dawid Weiss
dawid.weiss@...
Apr 26, 2012 10:01 pm
A simpler way would be to use a test rule and check if the test throws an exception (excluding assumption exceptions). This is an example rule that implements...
23865
Tomek Kaczanowski
kaczanowski.tomek@...
Apr 26, 2012 10:06 pm
Michael, I know this is not exactly what you are asking about, but please bear in mind that generation of test skeleton based on the class which already exists...
23866
Pete
tenorsaxman11
Apr 27, 2012 12:20 am
Thank you Dawid, however as I already mentioned in my question, TestWatcher methods are invoked after @After methods. pete...
23867
Dawid Weiss
dawid.weiss@...
Apr 27, 2012 5:48 am
You need to declare TestWatcher rule as a @ClassRule. Dawid ... [Non-text portions of this message have been removed]...
23868
Dawid Weiss
dawid.weiss@...
Apr 27, 2012 5:50 am
Sorry, completely lost the thread here. My intention was that you replace whatever you want to do in your @After hooks and put it in the rule instead...
23869
Malte Finsterwalder
maltefinster...
Apr 27, 2012 8:24 am
My answer is simple: Don't generate test stubs through IDE magic. It does not really help and potentially leads you down the wrong track. Writing good unit...
23870
barbara_a_bennett
barbara_a_be...
Apr 27, 2012 3:32 pm
Is the parameterized test class intended to have only one test method? I have created parameterized test classes with multiple test methods that use the same...
23871
David Saff
saffatgoogle
Apr 28, 2012 11:48 am
Hmm, that's odd. Not expected behavior. Were any of your parameters mutable types, such that if a value were shared between multiple invocations, it could...
23872
Pete
tenorsaxman11
Apr 28, 2012 11:49 am
That is a great idea. Sometimes you just need someone else's perspective -- not sure why that didn't occur to me before. Thanks Dawid!...
23873
.
tesco@...
Apr 28, 2012 2:39 pm
Hi, I'm not able to test a OSGi declarative service with a JUnit Plugin Test in Eclipse. Although all necessary bundles (especially the Service, the Consumer ...
23874
barbara_a_bennett
barbara_a_be...
Apr 30, 2012 8:49 pm
Maybe it is a case of me having bad expectations. I assumed that each of the tests would get the parameters as they are defined in the parameter section, not...
23875
tekmonk2005
Apr 30, 2012 10:04 pm
~ While trying to install tomcat-7.0.27 it tells me install ant, wich tells me to install junit and then you get: ~ BUILD FAILED ...
23876
Marc Philipp
mphilipp1982
May 1, 2012 12:38 pm
In line 179 of build.xml a java task is executed in order to run the AllTests suite. I'm not too familiar with Ant but this does not look like a JUnit issue. ...
23877
tekmonk2005
May 1, 2012 12:39 pm
~ I really don't know how to make sense of this, but ant does not appear to like symbolic links ... ~ lbrtchx ~ $ ls -l /usr/bin/ant lrwxrwxrwx 1 root root 20...
23878
tekmonk2005
May 1, 2012 12:39 pm
and this error is reported as a fixed bug ~ https://issues.apache.org/bugzilla/show_bug.cgi?id=45028 ~ lbrtchx...
23879
tekmonk2005
May 1, 2012 12:40 pm
Actually the complete failure trace is: dist: [java] Executing '/media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/jdk/jdk1.7.0_04/jre/bin/java' with arguments: ...