Search the web
Sign In
New User? Sign Up
junitperf
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
using TimedTest with JUnit 4   Message List  
Reply | Forward Message #86 of 94 |
I've been happily using JUnitPerf's TimedTest, but I'd also like to
use JUnit4. Unfortunately JUnit4's timeout requires a constant
expression, but I want to be able to get the timeout value
dynamically. But I'd also like to make some refactorings to my tests,
and that'd be a lot easier to do without JUnit3's forced inheritance
from TestCase. My JUnit3 timed code is like

public static Test suite() throws RunnerException {
Test testCase = new TestFooRunner("testFooRunner");
return new TimedTest(testCase, getMaxElapsedTime(), false);
}

How can I most easily run a TimedTest from a JUnit4 class? I'm
guessing this is easy, but I'm just not seeing it, and everything I've
tried has failed in some way, and not from timing out, unfortunately
:-(




Mon Mar 26, 2007 12:57 pm

tlroche
Offline Offline
Send Email Send Email

Forward
Message #86 of 94 |
Expand Messages Author Sort by Date

I've been happily using JUnitPerf's TimedTest, but I'd also like to use JUnit4. Unfortunately JUnit4's timeout requires a constant expression, but I want to be...
Thomas L Roche
tlroche
Offline Send Email
Mar 26, 2007
1:07 pm

Hi, I can't seem to be able to use JUnitPerf with JUnit4 either.. It would be great if someone can show me an example of how I can use TimedTest and LoadTest...
kaycheungchan
Offline Send Email
Mar 27, 2007
5:55 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help