On 03/09/2009, Brian Sweeney <[email protected]> wrote:
> I'm still not sure that I know the ins and outs of jmeter to talk about it 
> too much, but this is where my exploratory coding has taken me so far:
>
>  My initial idea (to learn the code) was to replace the functionality of a 
> 3.x unit test with the ability to run 4.x tests.  I started in 
> JUnitTestSamplerGui and added some functionality there and in ClassFinder to 
> detect classes that have methods marked with the @Test annotation.  I then 
> moved on to the JunitSampler.  I actually just subclassed to an 
> "AnnotatedSampler" to override the sample method.  The test fixture not being 
> of type TestCase is a bit awkward, but it is easy enough to make a small test 
> case that executes the method in question.  That all seems to work, though my 
> test case is failing.  I'm not sure that I have @Before and @After 
> implemented correctly.
>

Sounds OK.

>  I can't get my eclipse debugger to latch, even though I'm launching jmeter 
> from within eclipse.  I looked around the wikis for advice, but couldn't get 
> it worked out.  If you have any suggestions on getting that working, I'd 
> appreciate it.

Not sure what you mean by "latch".

Have you read "eclipse.readme" in the top level directory?

>  So the save/load seems to work and the test runs (though not correctly). The 
> big question in my mind is whether I should wrap the functionality into the 
> existing junit sampler or make a new junit4 sampler.  I'd lean toward 
> wrapping the functionality in 1 sampler and having the code figure out what 
> style of test is being run.  I can't imagine that a user actually cares.  
> They just want to run a test.

Agreed.

It might be worth adding an option to the GUI to choose between JUnit
3 and JUnit 4 (or both), but once the test cases have been found, it
should all be the same.

>  Any advice is welcome and appreciated.  Thanks for taking the time to review 
> my approach,
>
> Brian
>
>
>
>
>  -----Original Message-----
>  From: sebb [mailto:[email protected]]
>  Sent: Wednesday, September 02, 2009 8:01 PM
>  To: JMeter Developers List
>  Subject: Re: plans for 1.5+ & annotations
>
>  On 02/09/2009, Brian Sweeney <[email protected]> wrote:
>  > Hi,
>  >
>  >  I started working on a task to run some of my junit code via jmeter.  It 
> quickly became apparent (from the user mailing list archives) that junit 4.x 
> annotations weren't supported, so I put in some code to support them.  Since 
> the user list seems to indicate since jmeter is a java 1.4 product, it 
> doesn't make a lot of sense to integrate a 1.5+ feature.
>
>  The next release of JMeter will target 1.5+; the trunk code has
>  already been converted to use some features of 1.5 and now requires
>  1.5 to build.
>
>  >  But there appears to be a 1.5_prototype branch which seems more 
> appropriate.
>
>  That is rather old, and out of date, and is not a good starting point.
>
>  > I've seen some posting asking for this feature on places like coderanch 
> (http://www.coderanch.com/t/435852/Testing/JUnit-sampler-JMeter), so I'd like 
> to contribute if possible.  Any advice on the best way of delivering it would 
> be much appreciated.
>
>  The normal way to contribute code is via patches as attachments to a
>  Bugzilla issue.
>
>  Before spending a lot of time on it, it would be helpful if you could
>  briefly describe (here on the dev list) how you are planning to
>  support JUnit 4 so the approach can be validated.
>
>  >  Thanks,
>  >  Brian
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: [email protected]
>  >  For additional commands, e-mail: [email protected]
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [email protected]
>  For additional commands, e-mail: [email protected]
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [email protected]
>  For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to