TestNg / Selenium call by ant always return Can not find class in classpath

I’m pretty new with this setup. And having issue to call my project with TestNG by ant.

I can run the testng.xml without any problem in Eclipse but I alway receive Cannot find class in classpath by ant.

Build.xml







     
     
     
     
     

     









     

 
     
  
     
    <!--     -->
   


 

Testng.xml

    
    
    
    

    
        
    

    
        

            
                
                    
                    
                
            

        
    

My Class are at this path :

C:ESP_TestwareESP_ProjectsSeleniumtelus-pharma-integration-testssrctestjavacomgdotelus

Thanks for your help.

Try my build.xml file, I did add the ReportNG plugin into this build.xml file to generate better looking reports instead of the default TestNG reports. You can just download the jar file for ReportNG and place it into your lib folder and it should still work fine:

    
        <!--  -->



    
    
    
    
    



    
        
    
    


    
    
        
            
        
        

    

    




     

      

    
    
        
    

    
        
        
    

    

    
        
        
        

    

    

        

    




        
    

Here is my TestNG.xml file:




    
        
    

Hello, buddy!稿源:Hello, buddy! (源链) | 关于 | 阅读提示

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 综合编程 » TestNg &sol; Selenium call by ant always return Can not find class in classpath

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录