aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes maven not running my testfile in Selenium in command line Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "maven not running my testfile in Selenium in command line" Watch "maven not running my testfile in Selenium in command line" New topic
Author

maven not running my testfile in Selenium in command line

linda russel
Ranch Hand

Joined: Jan 05, 2012
Posts: 86
this is the error trace i get


-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.tutorvista.tvautomation.TestTVHomePageLogin
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.361 sec

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.415s
[INFO] Finished at: Tue Jan 31 16:25:50 IST 2012
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------


Everything is running fine from eclipse but the problem is from command line only.
linda russel
Ranch Hand

Joined: Jan 05, 2012
Posts: 86
why did not it run my tests??
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30929
    
158

What is in TestTVHomePageLogin? If JUnit 3.8, does it extend Test case and have testXXX methods? If JUnit 4, does it have @Test annotations?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
linda russel
Ranch Hand

Joined: Jan 05, 2012
Posts: 86
Hello Jeanne ,

I am using junit4 and i have a @Test Annotation

something might be wrong in pom.xml?


Thanks
linda russel
Ranch Hand

Joined: Jan 05, 2012
Posts: 86
This is my class

public class TestTVHomePageLogin {


and

@Test
public void testLogin() throws InterruptedException {


this is the method declaration


Thanks
linda russel
Ranch Hand

Joined: Jan 05, 2012
Posts: 86
Any clue??
linda russel
Ranch Hand

Joined: Jan 05, 2012
Posts: 86
i am using juni4

so any annotation other then Test is necessary?
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30929
    
158

linda dinda wrote:i am using juni4

so any annotation other then Test is necessary?

No. That looks good. And Maven is picking up on the class' existance since it is in your output. Moving to our Maven forum in case it is a Maven problem.
linda russel
Ranch Hand

Joined: Jan 05, 2012
Posts: 86
Thanks Jeanne


Its working fine now.

I did a Maven clean and maven generate-sources once from eclipse and after that everything is working fine even from command line.


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: maven not running my testfile in Selenium in command line