Hi,
I have some JUnit/Cactus tests that I am converting to JUnitPerf
timed and load tests. The JUnit test deploys and undeploys in setUp
() and tearDown(). For the JUnitPerf tests I only want setUp() to
occur for the first user first iteration....and for tearDown() I
only want to undeploy for last user last iteration. How best to
accomplish this?
I see on the JUnit FAQ about the RepeatedTest decorator.....because
of limitations in my understanding of design patterns and that we
have extended JUnit classes I am not sure about this approach.
I have modified a base class we use and have set a protected
variable...++ it in setUp()...and only do the work if this variable
== 1. And in tearDown() I -- it and again, only do the undeploy if
this variable == 1. Seems to work.
Other approaches?
Thanks,
Mike Foley
michael01612@...
Mike,
Thank you for the information. I figured out why the JUnitPerf test
was running so fast. I am trying to test pieces of code from a
portlet. The Portal server seems to have been caching the result
set. Thanks again.
On Oct 20, 2004, at 6:19 AM, ozonshak wrote:
> So, I guess my questions are 1) is JUnitPerf compatible with JUnitEE,
> 2) can JUnitPerf be run in a servlet/J2EE environment, 3) what are
> some alternate techniques for running my test where I perhaps can
> evaluate the results of the timed test to see if it actually ran
> correctly?
I don't have experience running JUnitPerf inside of a J2EE container,
so I can't speculate on how JUnitPerf might behave in that environment.
That said, I'm not aware of any design constraints that would preclude
it from working in that environment. JUnitPerf tests are JUnit tests,
so anywhere one can go the other can follow.
I generally run JUnitPerf tests from the outside looking in. For
example, if a servlet/J2EE component generates a web page full of data,
and that web page isn't being displayed in an appropriate amount of
time, then I write a JUnitPerf test that times the web response as
observed by HttpUnit.
You mention that you want to time a database query. Do you have to run
that test within the J2EE container? Querying a database doesn't sound
J2EE-specific to me. If you have to test it within the J2EE container
as it's designed today, then I'd look to refactor that chunk of logic
out into a class that didn't need a container. Perhaps it just needs a
database connection, for example.
Hope that helps.
Mike
Hello. I am trying to use JUnitPerf through a servlet rather than
the command line. Is this possible? I have a few test cases built
with JUnit that are working fine. I am also using JUnitEE so that I
can run these tests in a servlet environment. JUnitEE comes with a
servlet runner and a couple of GUI screens for test selection and
results. That is working fine as well. However, when I try and
integrate JUnitPerf for a Timed test, it does not seem to be
working.
For example, one of my existing test cases takes about 2 minutes to
run normally. It runs a database query and it is successful if one
or more records come back. When I try and use JUnitPerf to wrap
around this test case for a timed test (less than 30 seconds is
successful), it only runs for about 1 second and comes back
successful. So, I'm not sure if the test is running at all. I've
tried using junit.textui.TestRunner.run() to run the test, but this
method is mainly used from the command line, so I'm not sure it will
work in my case. I've also tried Test.run(), but I get the same
results.
So, I guess my questions are 1) is JUnitPerf compatible with JUnitEE,
2) can JUnitPerf be run in a servlet/J2EE environment, 3) what are
some alternate techniques for running my test where I perhaps can
evaluate the results of the timed test to see if it actually ran
correctly?
Thanks!
As a programmer, there's no greater joy for me than creating software
that others find useful and usable. On any given day I'm either getting
paid to write code for clients or I'm writing code for myself. I still
smile every time I receive an email from a satisfied JUnitPerf user.
Sometimes they just can't believe it's free software. I'd like to
provide an outlet for their guilt.
So if you want to support the ongoing development of JUnitPerf, please
consider purchasing a copy of my new book, "Pragmatic Project
Automation", available at:
http://www.pragmaticprogrammer.com/sk/auto/
It's all about putting your computer to work doing your mundane (but
important!), repetitive, and error-prone chores. If you like the kind
of automated checking that JUnitPerf supports, then you'll love the
book.
Thanks in advance!
Mike
I am the customer of ICICI BANK CREDIT CARD and also ICICI BANK. I used to pay my credit amount through icici bank cash counter. Every one knows that there is a autodebit facility in banks. But it must be applicable only when customer is not paying his minimum due amount, bankers will detect the minimum due amount in the last due date.But in ICICI BANK eventhough we are paying minimum due amount properly before the due date, the application detect the minimum due amount from bank account , IF THE ACCOUNT HOLDER dont have money in his account the system charge Rs.100/- in his credit card account. Is it bug or not??
Regards
ashok
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
Really Really Good Opportunities for QA/Testing Pros In Bangalore
Hi.
We are seeking top-notch QA professionals for large MNCs having
operations in Bangalore.
If you are from the Top 10 Engineering Colleges in India (IITs/RECs,
etc) preferably Computer Science.
If you have 3 to 7 years of experience in Testing applications on
Java/J2EE and experienced in Automated testing (Loadrunner,
Winrunner, Silk)
If you are working with a blue-chip company (an MNC or top Indian
Company)
Then, we WANT you. We have some really really good opportunities in
Bangalore.
Send in your resume to mark @ alphaeus.com or jobs @ alphaeus.com
Thanks,
Mark
+91-80-5121 6414 to 17
Does anyone here know of a solution for running distibuted
HttpUnit/JUnitPerf test scripts? I'm currently ssh'ing into
different machines and making ant calls, but I would like a way to
use my machine as a master and make ant calls to other machines with
their load tests. I'm trying to keep my load tests to 5 threads per
machine.
Thanks,
David
Yeah, me too...I posted the same question to HttpUnit, I'll let you
know if I get an answer.
Thanks!
David
--- In junitperf@yahoogroups.com, Mike Clark <mike@c...> wrote:
> I'm stumped as to where the "Wrong test finished" message is
coming
> from.
>
> Mike
>
> On Apr 30, 2004, at 10:05 AM, ddchili wrote:
>
> > Hi Mike, thanks for your response. I am using HttpUnit (1.5.4)
> > TestCases where each have their own WebConversation object and I
> > call the TestCases from a JUnit decorated suite by JUnitPerf in
the
> > following manner:
> >
> > int iterations = 1;
> > Timer timer = new ConstantTimer(0);
> >
> > Test test = new TestMethodFactory
> > (LoadNewUseCaseTestCase.class, "testLoadNewUseCase");
> > LoadTest loadTest = new LoadTest(test, TestFrame.MAXUSERS,
> > iterations, timer);
> > Test cleanUpTestCase = new DeleteAllUseCasesTestCase
> > ("testDeleteAllUseCases");
> >
> > TestSuite suite = new TestSuite();
> >
> > suite.addTest(loadTest);
> > suite.addTest(cleanUpTestCase);
> > return suite;
> >
> > The time to execute each test varies and the warning, "Wrong test
> > finshed" message seems to happen when I have my tests run
> > concurrently. If I set my ConstantTimer to allow for each test to
> > complete before the next test thread starts, then I don't receive
> > the warning. I named my threads a synchronized value and have
> > determined that they all finish in order.
> >
> > Any ideas would be appreciated. Thanks again!
> >
> > David
> >
> > --- In junitperf@yahoogroups.com, Mike Clark <mike@c...> wrote:
> >>
> >> On Apr 20, 2004, at 10:34 AM, ddchili wrote:
> >>
> >>> Hi all,
> >>>
> >>> I'm running my httpunit test as a client and I'm using
junitperf
> > to
> >>> do some basic load testing. I'm getting warnings stating the
> > wrong
> >>> test finished, but from what I can tell it's the first test
> > started,
> >>> and the first to stop. I added a synchronized static int to the
> > test
> >>> name to see test that the first test started was the first test
> > to
> >>> stop. I can get this problem if I run more than 1 LoadTest
users
> >>> (threads) and set my LoadTest timer (delay) to 0 milliseconds
or
> > a
> >>> value under the time needed for the first test to complete.
> > Here's
> >>> the warning with running 5 users:
> >>
> >> The "Wrong test finished" warning isn't being issued by
> > JUnitPerf.
> >> Perhaps it's originating in HttpUnit.
> >>
> >> Can you share other details that might help diagnose the
problem?
> >>
> >> Mike
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> Mike
I'm stumped as to where the "Wrong test finished" message is coming
from.
Mike
On Apr 30, 2004, at 10:05 AM, ddchili wrote:
> Hi Mike, thanks for your response. I am using HttpUnit (1.5.4)
> TestCases where each have their own WebConversation object and I
> call the TestCases from a JUnit decorated suite by JUnitPerf in the
> following manner:
>
> int iterations = 1;
> Timer timer = new ConstantTimer(0);
>
> Test test = new TestMethodFactory
> (LoadNewUseCaseTestCase.class, "testLoadNewUseCase");
> LoadTest loadTest = new LoadTest(test, TestFrame.MAXUSERS,
> iterations, timer);
> Test cleanUpTestCase = new DeleteAllUseCasesTestCase
> ("testDeleteAllUseCases");
>
> TestSuite suite = new TestSuite();
>
> suite.addTest(loadTest);
> suite.addTest(cleanUpTestCase);
> return suite;
>
> The time to execute each test varies and the warning, "Wrong test
> finshed" message seems to happen when I have my tests run
> concurrently. If I set my ConstantTimer to allow for each test to
> complete before the next test thread starts, then I don't receive
> the warning. I named my threads a synchronized value and have
> determined that they all finish in order.
>
> Any ideas would be appreciated. Thanks again!
>
> David
>
> --- In junitperf@yahoogroups.com, Mike Clark <mike@c...> wrote:
>>
>> On Apr 20, 2004, at 10:34 AM, ddchili wrote:
>>
>>> Hi all,
>>>
>>> I'm running my httpunit test as a client and I'm using junitperf
> to
>>> do some basic load testing. I'm getting warnings stating the
> wrong
>>> test finished, but from what I can tell it's the first test
> started,
>>> and the first to stop. I added a synchronized static int to the
> test
>>> name to see test that the first test started was the first test
> to
>>> stop. I can get this problem if I run more than 1 LoadTest users
>>> (threads) and set my LoadTest timer (delay) to 0 milliseconds or
> a
>>> value under the time needed for the first test to complete.
> Here's
>>> the warning with running 5 users:
>>
>> The "Wrong test finished" warning isn't being issued by
> JUnitPerf.
>> Perhaps it's originating in HttpUnit.
>>
>> Can you share other details that might help diagnose the problem?
>>
>> Mike
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
Mike
Hi Mike, thanks for your response. I am using HttpUnit (1.5.4)
TestCases where each have their own WebConversation object and I
call the TestCases from a JUnit decorated suite by JUnitPerf in the
following manner:
int iterations = 1;
Timer timer = new ConstantTimer(0);
Test test = new TestMethodFactory
(LoadNewUseCaseTestCase.class, "testLoadNewUseCase");
LoadTest loadTest = new LoadTest(test, TestFrame.MAXUSERS,
iterations, timer);
Test cleanUpTestCase = new DeleteAllUseCasesTestCase
("testDeleteAllUseCases");
TestSuite suite = new TestSuite();
suite.addTest(loadTest);
suite.addTest(cleanUpTestCase);
return suite;
The time to execute each test varies and the warning, "Wrong test
finshed" message seems to happen when I have my tests run
concurrently. If I set my ConstantTimer to allow for each test to
complete before the next test thread starts, then I don't receive
the warning. I named my threads a synchronized value and have
determined that they all finish in order.
Any ideas would be appreciated. Thanks again!
David
--- In junitperf@yahoogroups.com, Mike Clark <mike@c...> wrote:
>
> On Apr 20, 2004, at 10:34 AM, ddchili wrote:
>
> > Hi all,
> >
> > I'm running my httpunit test as a client and I'm using junitperf
to
> > do some basic load testing. I'm getting warnings stating the
wrong
> > test finished, but from what I can tell it's the first test
started,
> > and the first to stop. I added a synchronized static int to the
test
> > name to see test that the first test started was the first test
to
> > stop. I can get this problem if I run more than 1 LoadTest users
> > (threads) and set my LoadTest timer (delay) to 0 milliseconds or
a
> > value under the time needed for the first test to complete.
Here's
> > the warning with running 5 users:
>
> The "Wrong test finished" warning isn't being issued by
JUnitPerf.
> Perhaps it's originating in HttpUnit.
>
> Can you share other details that might help diagnose the problem?
>
> Mike
On Apr 20, 2004, at 10:34 AM, ddchili wrote:
> Hi all,
>
> I'm running my httpunit test as a client and I'm using junitperf to
> do some basic load testing. I'm getting warnings stating the wrong
> test finished, but from what I can tell it's the first test started,
> and the first to stop. I added a synchronized static int to the test
> name to see test that the first test started was the first test to
> stop. I can get this problem if I run more than 1 LoadTest users
> (threads) and set my LoadTest timer (delay) to 0 milliseconds or a
> value under the time needed for the first test to complete. Here's
> the warning with running 5 users:
The "Wrong test finished" warning isn't being issued by JUnitPerf.
Perhaps it's originating in HttpUnit.
Can you share other details that might help diagnose the problem?
Mike
Hi all,
I'm running my httpunit test as a client and I'm using junitperf to
do some basic load testing. I'm getting warnings stating the wrong
test finished, but from what I can tell it's the first test started,
and the first to stop. I added a synchronized static int to the test
name to see test that the first test started was the first test to
stop. I can get this problem if I run more than 1 LoadTest users
(threads) and set my LoadTest timer (delay) to 0 milliseconds or a
value under the time needed for the first test to complete. Here's
the warning with running 5 users:
time to receive response after click = 2172
Wrong test finished. Last started: testLoadTabNavigation
(com.f4tech.slm.application.portal.guitestframework.loadtest.LoadTabN
avigationTestCase) stopped: test: 1
(com.f4tech.slm.application.portal.guitestframework.loadtest.LoadTabN
avigationTestCase)
time to receive response after click = 2141
Wrong test finished. Last started: testLoadTabNavigation
(com.f4tech.slm.application.portal.guitestframework.loadtest.LoadTabN
avigationTestCase) stopped: test: 2
(com.f4tech.slm.application.portal.guitestframework.loadtest.LoadTabN
avigationTestCase)
time to receive response after click = 1390
Wrong test finished. Last started: testLoadTabNavigation
(com.f4tech.slm.application.portal.guitestframework.loadtest.LoadTabN
avigationTestCase) stopped: test: 3
(com.f4tech.slm.application.portal.guitestframework.loadtest.LoadTabN
avigationTestCase)
time to receive response after click = 1172
Wrong test finished. Last started: test: 5
(com.f4tech.slm.application.portal.guitestframework.loadtest.LoadTabN
avigationTestCase) stopped: test: 4
(com.f4tech.slm.application.portal.guitestframework.loadtest.LoadTabN
avigationTestCase)
time to receive response after click = 953
Any help in this would be greatly appreciated.
Thanks,
David
Howdy,
I've fixed the bug related to the Swing UI's progress bar not turning
red when a TimedTest fails. A failure message was being printed for
failed tests, but the progress bar continued to be green. It turns out
that a TestDecorator needs to call TestResult.endTest() after adding a
failure or error in order to notify all test listeners.
JUnitPerf 1.9 is now available at:
http://clarkware.com/software/JUnitPerf.html
Thanks to those of you who reported this bug and patiently waited for
it to be fixed. :-)
Regards,
Mike
Hi fellow perf-ers,
I'm performance testing some stateless session bean methods on jboss3.2 with
mysql 4 on windows 2000. Everything works GREAT with one user and at least
1000 millis for a timer. However if I go to more users or less timer jboss
hangs. It could be a windoze thing. Maybe someone has some insight??
Timer timer = new ConstantTimer(1000); //Set this at 100 and test freezes
on windows
users = 1; //increase this to 2 or more and test eventually freezes on
windows
iterations = 100000;
long maxElapsedTime = 100;
Test testCase = new TestTellerPeformance("testCreateOneTransaction");
Test timedTest = new TimedTest(testCase, maxElapsedTime);
Test loadTest = new LoadTest(timedTest, users, iterations, timer);
suite.addTest(loadTest);
Thanks!
Sam
On Jan 19, 2004, at 9:30 AM, msegvich wrote:
> When I try and use the swingui (e.g. junit.swingui.TestRunner.run
> (myclass.class))instead of the textui the bar turns green even
> though my performance tests fail. Yet, JUnit does acknowledge
> failures. Is this inconsistency due to JUnitPerf extending
> TestDecorator, since decorators are executed before or after tests?
> Is there a way to have the bar turn red when the performance tests
> fail?
>
Interesting. Perhaps JUnitPerf is failing to set some bit needed by
the Swing GUI. I'll make a point of investigating this and reporting
back my findings.
Thanks for the heads-up.
Regards,
Mike
When I try and use the swingui (e.g. junit.swingui.TestRunner.run
(myclass.class))instead of the textui the bar turns green even
though my performance tests fail. Yet, JUnit does acknowledge
failures. Is this inconsistency due to JUnitPerf extending
TestDecorator, since decorators are executed before or after tests?
Is there a way to have the bar turn red when the performance tests
fail?
Hi all,
I am having some trouble getting execution times for individual test
cases.
I am using junitperf in combination with cactus to automate load tests
on the server side. The tests are executed from an ant task with the
following definition:
<junit printsummary="yes"
haltonfailure="no"
fork="yes"
failureProperty="test.failure"
showoutput="yes">
<formatter type="xml"/>
<test name="some.Test"
todir="${dist.dir}/reports"/>
<classpath>
<fileset dir="${dist.dir}/lib" includes="*.jar"/>
</classpath>
</junit>
<junitreport todir="${dist.dir}/reports">
<fileset dir="${dist.dir}/reports">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${dist.dir}/reports/html"/>
</junitreport>
After executing the task, I get consistent execution times on the
standard output:
[junit] TimedTest (WAITING): testLocateUser(some.Test): 93133 ms
[junit] TimedTest (WAITING): testLocateUser(some.Test): 93295 ms
[junit] TimedTest (WAITING): testLocateUser(some.Test): 95293 ms
[junit] TimedTest (WAITING): testLocateUser(some.Test): 96295 ms
[junit] TimedTest (WAITING): testLocateUser(some.Test): 97981 ms
However, the times shown in the HTML report generated by junit are not
consistent. Some of the values being NaN:
testLocateUser Success NaN
testLocateUser Success 0.183
testLocateUser Success 1.166
testLocateUser Success NaN
testLocateUser Success 92.952
Apparently, only the last value is correct.
Has anybody faced this same problem?
Any comments or suggestions will be very welcome.
Regards,
Oscar
Folks, we're going to take this discussion off-line. Indeed, I should
have taken it off-line earlier. If anyone is interested in the outcome,
let me know and I'll write up a summary.
Mike
Sagar wrote:
>
>
> Dear Mike,
>
> We are struck with the problem that we specified in previous
> mail. It seems u only can give a solution for it. Please respond on
> our problem. We r thankful to you for sparing your valuable time.
>
>
> regards,
>
>
>
> -Sagar.
We are struck with the problem that we specified in previous mail. It seems u only can give a solution for it. Please respond on our problem. We r thankful to you for sparing your valuable time.
Note that by doing this MyTestCase won't be reloadable through the Swing UI.
Regards,
Mike
Dear Mike,
We are happy to inform u that junit is running fine. But unfortunately we are still unable to run junitperf program (Which we sent in previous mail as an attachment). _____________________________________________________________
previously our excluded.properties file was
# # The list of excluded package paths for the TestCaseClassLoader # excluded.0=sun.* excluded.1=com.sun.* excluded.2=org.omg.* excluded.3=javax.* excluded.4=sunw.* excluded.5=java.*
You said that you are able to to run all our batch files. But in our case we are unable to run run.bat which is having junitperf stuff.
So if any more changes we need to do so as to execute junitperf please reply us. We r attaching the screen shot of our error(UnsatisfiedLinkError). We tried it both in textui and swingui. Expecting your response soon.
Note that by doing this MyTestCase won't be reloadable through the Swing UI.
Regards,
Mike
Dear Mike,
We are happy to inform u that junit is running fine. But unfortunately we are still unable to run junitperf program (Which we sent in previous mail as an attachment). _____________________________________________________________
previously our excluded.properties file was
# # The list of excluded package paths for the TestCaseClassLoader # excluded.0=sun.* excluded.1=com.sun.* excluded.2=org.omg.* excluded.3=javax.* excluded.4=sunw.* excluded.5=java.*
You said that you are able to to run all our batch files. But in our case we are unable to run run.bat which is having junitperf stuff.
So if any more changes we need to do so as to execute junitperf please reply us. We r attaching the screen shot of our error(UnsatisfiedLinkError). We tried it both in textui and swingui. Expecting your response soon.
Sagar wrote:
>
> Thanx for your reply. but the problem we are facing is implementation
> through the
>
> Junitperf and you have asked about the working through explicit runner ,
> which is part of our problem.and that peculiar behaviour is because of
> native methods what we are calling through wrapper.dll.
>
> But the main problem what we are facing is " Unable to call the native
> methods using JUnitperf through wrapper.dll " so could you please help
> us in that so that we can come out the main problem.
>
>
> We are sending the problem with junit and junitperf. Sample code, screen
> shots and cpp files for your reference as an attachment. We have created
> batch files run.bat, run1.bat, run2.bat using which you can directly
> execute the code. We have written comments for our code where ever we
> are facing problems. Please kindly reply as soon as you can.
>
Adding the following to the JUnit excluded.properties file fixes the
problem:
excluded.9=MyTestCase
I've successfully run all of your batch files after applying that change.
This entry in the JUnit FAQ explains how to do that and reasons why the
problem may occur:
http://junit.sourceforge.net/doc/faq/faq.htm#running_8
Note that by doing this MyTestCase won't be reloadable through the Swing
UI.
Regards,
Mike
--
Mike Clark
http://clarkware.com
(303) 589-3812
Thanx for your reply. but the problem we are facing is implementation through the
Junitperf and you have asked about the working through explicit runner , which is part of our problem.and that peculiar behaviour is because of native methods what we are calling through wrapper.dll.
But the main problem what we are facing is " Unable to call the native methods using JUnitperf through wrapper.dll " so could you please help us in that so that we can come out the main problem.
We are sending the problem with junit and junitperf. Sample code, screen shots and cpp files for your reference as an attachment. We have created batch files run.bat, run1.bat, run2.bat using which you can directly execute the code. We have written comments for our code where ever we are facing problems. Please kindly reply as soon as you can.
Sagar wrote:
>
> We are using JUnit test runner and we are not using Ant. We
> are running it on Win 2000 platform. We are loading cpp dll through
> wrapper dll(JNI). Unable to access methods in the dll file. The
> test case written using JUnit [which is calling native methods(JNI)]
> is working fine. But when we try to load test this class(LoadTest
> etc) in junitperf it is giving following error.
>
> java.lang.UnsatisfiedLinkError: InitializeTCCommDLL
> at TCImpl.InitializeTCCommDLL(Native Method)
>
> one more peculiar behaviour we observed is that a junit test
> case(which calls Native methods) which works fine when run from
> console(Ex: c:\> java junit.swingui.TestRunner MyTestCase), is
> giving the above error when called from some other program.
>
Given that peculiar behavior, I'd try running the JUnitPerf Load test
the same way that appears to work for the unit test:
> java junit.swingui.TestRunner YourLoadTestCase
You mentioned that it works fine for the console, but the example
mentions the swingui. I'd try both using the above form.
Seems odd that it would work using an explicit runner, but not when
called from a main() method. Can you confirm that behavior?
Mike
--
Mike Clark
http://clarkware.com
(303) 589-3812
> Hi, > we are working on JNI and Junit perf tool while accesing native > methods very first time the test passes successfully for next > iteration we are getting > java.lang.UnsatisfiedLinkError: InitializeTCCommDLL > at TCImpl.InitializeTCCommDLL(Native Method) > at TCImpl.testMain(TCImpl.java:69) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:25) > java.lang.UnsatisfiedLinkError: Native Library C:\Public\08012003 > \perf-tool 11-11 AM\TCImpl.dl > l already loaded in another classloader > > In Some help docs we found JNI inforces an additional restriction > that only one classLoader in a JVM may possess a particular native > library. That's
the gist of the problem with the ReloadingTestRunners. > Is it true? if so how can we test native calls using JNI and > Junitperf? >
Please you tell us more about the test runner you're using, or if you're using the <junit> task in Ant.
We are using JUnit test runner and we are not using Ant. We are running it on Win 2000 platform. We are loading cpp dll through wrapper dll(JNI). Unable to access methods in the dll file. The test case written using JUnit [which is calling native methods(JNI)] is working fine. But when we try to load test this class(LoadTest etc) in junitperf it is giving following error.
java.lang.UnsatisfiedLinkError: InitializeTCCommDLL at TCImpl.InitializeTCCommDLL(Native Method)
one more peculiar behaviour we observed is that a junit test case(which calls Native methods) which works fine when run from console(Ex: c:\> java junit.swingui.TestRunner MyTestCase), is giving the above error when called from some other program.
hellovidyasagar wrote:
> Hi,
> we are working on JNI and Junit perf tool while accesing native
> methods very first time the test passes successfully for next
> iteration we are getting
> java.lang.UnsatisfiedLinkError: InitializeTCCommDLL
> at TCImpl.InitializeTCCommDLL(Native Method)
> at TCImpl.testMain(TCImpl.java:69)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
> java.lang.UnsatisfiedLinkError: Native Library C:\Public\08012003
> \perf-tool 11-11 AM\TCImpl.dl
> l already loaded in another classloader
>
> In Some help docs we found JNI inforces an additional restriction
> that only one classLoader in a JVM may possess a particular native
> library. That's the gist of the problem with the ReloadingTestRunners.
> Is it true? if so how can we test native calls using JNI and
> Junitperf?
>
Please you tell us more about the test runner you're using, or if you're
using the <junit> task in Ant.
Mike
--
Mike Clark
http://clarkware.com
(303) 589-3812
Hi,
we are working on JNI and Junit perf tool while accesing native
methods very first time the test passes successfully for next
iteration we are getting
java.lang.UnsatisfiedLinkError: InitializeTCCommDLL
at TCImpl.InitializeTCCommDLL(Native Method)
at TCImpl.testMain(TCImpl.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
java.lang.UnsatisfiedLinkError: Native Library C:\Public\08012003
\perf-tool 11-11 AM\TCImpl.dl
l already loaded in another classloader
In Some help docs we found JNI inforces an additional restriction
that only one classLoader in a JVM may possess a particular native
library. That's the gist of the problem with the ReloadingTestRunners.
Is it true? if so how can we test native calls using JNI and
Junitperf?
pls pullout us from this.
Thanks,
Murthy.
(murthy@...)
Howdy,
This week's JavaProNews sports an article I wrote on how to use
JUnitPerf to write tests to ensure performance requirements are
continually kept in check:
http://javapronews.com/javapronews-47-20030721ContinuousPerformanceTestingwithJU\
nitPerf.html
The article is adapted from Chapter 9 of the recently-published book
"Bitter EJB". In that chapter I discuss common antipatterns related to
the performance tuning process in general and I use JUnitPerf to
confidently tune an example application. Let me know if it resonates
with you.
Enjoy!
Mike
--
Mike Clark
http://clarkware.com
(303) 589-3812
Howdy,
The folks at IronGrid were cool enough to ask me if they could tap into
the collective experience of this group. And while I generally don't
like to push vendor surveys your way, I really think they've put
together a sweet deal exclusively for members of this group. The
details are included below. In short, try their latest product, fill out
a brief online survey, and in return you'll earn a $50 gift certificate
at Amazon.com. That spells "new book" for me! :-)
I haven't had a chance to try out their IronTrack SQL product yet -- it
was just unveiled today! -- but it looks like a great approach to
continuously, and automatically, testing database (JDBC) performance.
It's surely no secret that I'm a big fan of writing performance tests
once, then letting this thing called a computer run them early and often.
So, although I can't endorse IronTrack SQL at this point, I believe it's
a giant step in the right direction. Let them know what you think!
Mike
P.S. If, for any reason, you take offense to the use of this forum for
this purpose, please let me know privately.
====================================================
Hi folks,
I'm trying to collect some info about the most common JVM-level
performance problems that affect Java apps. I'd really appreciate if
you could take a minute to fill out this survey.
http://www.zoomerang.com/survey.zgi?TG11VDLC71F94R7SH8H9YS8G
Complete our survey, try our product, and get $50 at Amazon.com!
As a special Thank You for JUnitPerf group members, we're offering a $50
Amazon gift certificate to any JUnitPerf members who takes our survey
and tries our product, IronTrack SQL.
IronTrack SQL is a development tool that helps developers capture and
analyze all application-to-database activity at the JDBC level. It
offers automated database performance testing via an Ant task. This
offer is only available to current members of JUnitPerf on July 21, 2003.
To participate in this survey that will help shape our future product
strategy, just follow these 4 steps:
1. Take our survey:
http://www.zoomerang.com/survey.zgi?TG11VDLC71F94R7SH8H9YS8G
Don't forget to enter your email address at the end (this must match
your address as registered with the JUnitPerf Yahoo Group).
3. Download IronTrack SQL and try it.
http://irongrid.com/irontracksql
4. Complete the Exit Survey verifying use of IronTrack SQL (3 of
5 correct answers is sufficient to confirm an honest attempt):
http://www.zoomerang.com/survey.zgi?R734WHFSB84BDSWBAQHKWDJG
5. Get a $50 gift certificate at Amazon.com!
Thanks!
Jeremy Bencken
Product Manager
IronGrid, Inc.
-----------------------------------------------------------------------
IronGrid - Include performance testing in every build
http://www.irongrid.com