XML : testng.xml is not executed from batch file

I've read many tutorials and threads, but cannot resolve my problem. I'm getting "Could not find or load main class org.testng.TestNG" error all the time and can't find solution.

That's how my project structure looks like:

That's my .xml file code:

  <?xml version="1.0" encoding="UTF-8"?>  <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">  <suite name="Suite" parallel="false">  <test name="Test">  <classes>    <class name="olatest_2.rejestracja"/>    <class name="olatest_2.logowanie"/>  </classes>  </test> <!-- Test -->  </suite> <!-- Suite -->    

I've tried different ways of composing my .bat file, but none of the works.

  set projectLocation=C:\ENVIRONMENT\eclipse\WORKSPACE\PZW_2  cd %projectLocation%  set classpath=%projectLocation%\bin  java org.testng.TestNG %projectLocation%\testng.xml  pause    

3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete