Guest User

Untitled

a guest
Oct 23rd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. XML:
  2.  
  3.  
  4. <project default="test">
  5.  
  6. <path id="cp">
  7. <pathelement location="C:/testng-6.0.1/testng-6.0.1.jar"/>
  8. </path>
  9.  
  10. <taskdef name="testng" classpathref="cp" classname="org.testng.TestNGAntTask" />
  11.  
  12. <target name="test">
  13. <testng classpathref="cp" groups="deposit">
  14. <classfileset dir="bin/" includes="Account.class"/>
  15. </testng>
  16. </target>
  17.  
  18. </project>
  19.  
  20.  
  21.  
  22. Given that C:\Temp\testNG\testng_test\bin has a file called Account.class, why would ant spit out
  23.  
  24. C:\Temp\testNG\TESTNG~1>ant
  25. Buildfile: C:\Temp\testNG\TESTNG~1\build.xml
  26.  
  27. test:
  28. [testng] Exception in thread "main" org.testng.TestNGException:
  29. [testng] Cannot load class from file: C:\Temp\testNG\TESTNG~1\bin\Account.cla
  30. ss
  31. [testng] at org.testng.internal.ClassHelper.fileToClass(ClassHelper.java:
  32. 585)
  33. [testng] at org.testng.TestNG.configure(TestNG.java:1211)
  34. [testng] at org.testng.TestNG.privateMain(TestNG.java:1172)
  35. [testng] at org.testng.TestNG.main(TestNG.java:1146)
  36. [testng] The tests failed.
  37.  
  38. BUILD SUCCESSFUL
  39. Total time: 0 seconds
Add Comment
Please, Sign In to add comment