Application doesn't load, Test still runs through

5 views
Skip to first unread message

Jack

unread,
Oct 7, 2008, 5:58:32 AM10/7/08
to selenium-users...@googlegroups.com
hello guys,

I'm new here. I'm trying to use Selenium Remote Control for a Webapplication in an embedded Tomcat using the Maven Plugin Cargo. My problem is that some tests, which shouldn't run through, do so. I tried to use *firefox, but for some reasons this didn't work. So I tried *iexplore, which also didn't work and I decided to use *iehta. This worked 1 times, but not for the second time and I just do not why. I'm trying to solve the problem since several days, but I just couldn't. I hope that one of you guys can help me.

I'm creating a new DefaultSelenium("localhost", 4444, "*iehta", "http://localhost:8080/");
starting the selenium.

thats my testmethod, which should definitely fail:
selenium.open("war/application/index.xhtml");\\ selenium.waitForPageToLoad("300000");\\ verifyTrue(selenium.isTextPresent("gffabdfgdfcfjgdfgf"));

A new Browser opens, but everything happens so fast, dass I cannot follow with my eyes. When I try it with other Websites on localhost, it works without any problems. Do anyone know where the problem could be?

Greetings

Jack

Jack

unread,
Oct 8, 2008, 3:54:29 AM10/8/08
to selenium-users...@googlegroups.com
Thanks for you reply. I didn't know, that there is a difference. After trying it with assertTrue instead of verifyTrue

*when I try it with *iehta, I receive the following message:*

Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 13.751 sec <<< FAILURE!\\ testNew(Path.to.Tests.Test003) Time elapsed: 13.711 sec <<< FAILURE!\\ junit.framework.AssertionFailedError: null\\ at junit.framework.Assert.fail(Assert.java:47)\\ at junit.framework.Assert.assertTrue(Assert.java:20)\\ at junit.framework.Assert.assertTrue(Assert.java:27)\\ at signaliduna.anwendungsdatenbank.Test003.testNew(Test003.java:50)\\ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\\ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\\ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\\ at java.lang.reflect.Method.invoke(Method.java:585)\\ at junit.framework.TestCase.runTest(TestCase.java:168)\\ at junit.framework.TestCase.runBare(TestCase.java:134)\\ at com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:71)\\ at junit.framework.TestResult$1.protect(TestResult.java:110)\\ at junit.framework.TestResult.runProtected(TestResult.java:128)\\ at junit.framework.TestResult.run(TestResult.java:113)\\ at junit.framework.TestCase.run(TestCase.java:124)\\ at junit.framework.TestSuite.runTest(TestSuite.java:232)\\ at junit.framework.TestSuite.run(TestSuite.java:227)\\ at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)\\ at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)\\ at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)\\ at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)\\ at org.apache.maven.surefire.Surefire.run(Surefire.java:177)\\ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\\ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\\ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\\ at java.lang.reflect.Method.invoke(Method.java:585)\\ at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)\\ at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)

*when I try it with *iexplore, I receive the following message:*

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 17.753 sec <<< FAILURE!\\ testNew(Path.to.Tests.Test003) Time elapsed: 17.722 sec <<< ERROR!\\ com.thoughtworks.selenium.SeleniumException: Erlaubnis verweigert.(means permission denied)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:73)\\ at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:222)\\ at signaliduna.anwendungsdatenbank.Test003.testNew(Test003.java:48)\\ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\\ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\\ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\\ at java.lang.reflect.Method.invoke(Method.java:585)\\ at junit.framework.TestCase.runTest(TestCase.java:168)\\ at junit.framework.TestCase.runBare(TestCase.java:134)\\ at com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:71)\\ at junit.framework.TestResult$1.protect(TestResult.java:110)\\ at junit.framework.TestResult.runProtected(TestResult.java:128)\\ at junit.framework.TestResult.run(TestResult.java:113)\\ at junit.framework.TestCase.run(TestCase.java:124)\\ at junit.framework.TestSuite.runTest(TestSuite.java:232)\\ at junit.framework.TestSuite.run(TestSuite.java:227)\\ at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)\\ at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)\\ at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)\\ at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)\\ at org.apache.maven.surefire.Surefire.run(Surefire.java:177)\\ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\\ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\\ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\\ at java.lang.reflect.Method.invoke(Method.java:585)\\ at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)\\ at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)

I hope this helps you locating the problem.

Jack

unread,
Oct 9, 2008, 3:40:05 AM10/9/08
to selenium-users...@googlegroups.com
The assertion is right, I'm quite sure of that, but the problem is, that the application doesn't load. Yesterday I spent the whole time trying to find out, where the problem is and came to the conclusion, that when I first type *mvn clean cargo:start cargo:deploy* (1) and then *mvn cargo:start integration-test* (2) it works, the test runs through without any errors or failures. But when I try *mvn clean cargo:start cargo:deploy integration-test* (3), then the application still doesn't load. I don't know why, but this sounds weird. When I compare the directories, it seems like that the difference between the dir after 2 and 3 are log files, the result of the test and 2 Bytes of the .jar File. The one from 2 is 2957 and the one from 3 is 2955 Bytes. Did the same thing happened to one of you?

Reply all
Reply to author
Forward
0 new messages