0

I am not able to run the test cases in my eclipse IDE. I am getting the below messages when I run one or more test cases. Can anybody tell me the solution ?

 [RemoteTestNG] detected TestNG version 6.8.9
    [RemoteTestNG] Invoked with -serport 57601 -protocol json -d F:\encoreworks\maininterface\test-output C:\Users\Admin\AppData\Local\Temp\testng-eclipse--1595370957\testng-customsuite.xml 
    [BaseMessageSender] Waiting for Eclipse client on localhost:57601
    [BaseMessageSender] Received a connection from Eclipse on localhost:57601
    [BaseMessageSender] Connection established, starting reader thread
    [BaseMessageSender] ReaderThread waiting for an admin message
    [JsonMessageSender] Sending message [GenericMessage suiteCount:1 testCount:1]
    [BaseMessageSender] ReaderThread received admin message:>ACK
    [BaseMessageSender] Received ACK:>ACK
    [BaseMessageSender] Received ACK:>ACK
    [TestNG] Running:
      C:\Users\Admin\AppData\Local\Temp\testng-eclipse--1595370957\testng-customsuite.xml

    [JsonMessageSender] Sending message [SuiteMessage suite:Default suite starting methodCount:0]
    [JsonMessageSender] Sending message [TestMessage suite:Default suite testName:Default test passed:0 failed:0]
    [BaseMessageSender] Received ACK:>ACK
    [BaseMessageSender] Received ACK:>ACK
    [BaseMessageSender] Received ACK:>ACK
    [BaseMessageSender] Received ACK:>ACK
    [JsonMessageSender] Sending message [TestMessage suite:Default suite testName:Default test passed:0 failed:0]
    [BaseMessageSender] Received ACK:>ACK
    [BaseMessageSender] Received ACK:>ACK
    [JsonMessageSender] Sending message [SuiteMessage suite:Default suite ending methodCount:0]

    ===============================================
    Default suite
    Total tests run: 0, Failures: 0, Skips: 0
    ===============================================

    [BaseMessageSender] Received ACK:>ACK
    [BaseMessageSender] Received ACK:>ACK
juherr
  • 5,640
  • 1
  • 21
  • 63
Karthik_S_A
  • 73
  • 2
  • 15
  • can u try updating eclipse testng plugin as well as TestNG jar to 6.9.11 – Mrunal Gosar Aug 23 '16 at 13:35
  • there is no such version 6.8.9 on Maven Central: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.testng%22%20AND%20a%3A%22testng%22, so i'm wondering how did you have this version? can you update TestNG to 6.8.21 (the last of 6.8.x) or to the latest 6.9.12 (available on JCenter) – XuQing Tan Aug 24 '16 at 01:52
  • did you solve your problem? – Bohne Sep 19 '16 at 13:09

2 Answers2

1

I was facing similar issues. Upgrading testng, eclipse, nothing helped. Finally I could resolve this issue. Solution that worked for me is given below:
Testng version mentioned in Maven: 6.8.7
Eclipse TestNG plugin version: 6.11
Eclipse Version: Neon.3 Release (4.6.3)

Go to Eclipse > Project Explorer > right click on project name > go to Build Path > configure build path > Properties for project window opens > search for testng > expand testng > Maven option appears > click on Maven> uncheck "Properties (TestNG CLI arguments)" option > eclipse setting screenshot > apply

If you are using Eclipse LUNA version follow below steps: Go to Eclipse > Project Explorer > right click on project name > go to Build Path > configure build path > Properties for project window opens > search and click testng > enable project specific testng checkbox

user3181500
  • 401
  • 1
  • 5
  • 12
0

I had the same weird problem and solved it by compiling the project and running the test again.

To tell the whole story: In my maven project I deleted the "target" folder and tried running the test. It now failed with "Unable to read methods on class... unable to resolve class reference....".

So by executing Maven with "package"-goal, I realized there is a failure in my pom.xml (target version in maven-compiler-plugin was anything but 1.8). After fixing this, my Maven build runs without problems. With the new classes in the new target fold TestNG runs again.

Bohne
  • 4,029
  • 1
  • 16
  • 22