【问题标题】:TestNG [Error] no test suite found. nothing to runTestNG [错误] 未找到测试套件。没什么可跑的
【发布时间】:2015-08-24 05:50:20
【问题描述】:

我是 无法从命令行运行 testng 测试套件我使用的是 windows 系统

TestNG [错误] 未找到测试套件。没什么可跑的 有报告 ng listeners 我已经从我的 xml 中删除了,我已经从库中删除了这些 jar

我参考了这个链接 No Test suite found nothing to run

用于运行测试套件的命令

cd C:\Users\workspace\myproject

java -cp C:\Users\workspace\myproject\libs\*;C:\Users\workspace\myproject\bin org.testng.TestNG Analytics.xml

Analytics.xml
<?xml version="1.0" encoding="UTF-8"?>
<suite name="BLR_Analytics" verbose="10" parallel="tests">

    <test name="Login" group-by-instances="true" verbose="3">
            <classes>
                <class name="analyticsMain.MainExecute" />

            </classes>
    </test>

</suite>    

请帮忙 谢谢, 柴坦尼亚

【问题讨论】:

    标签: java xml selenium-webdriver command testng


    【解决方案1】:
    When I started to run TestNG xml from console,I got lots of errors.I am not sure which error you are getting exactly,you try following one:
    
    java -cp "C:\TestNG\testng.jar;C:\TestNG\jcommander.jar;H:\project\Test\src;c:\selenium-webdriver\selenium-java-2.45.0.jar;c:\selenium-webdriver\libs\*" org.testng.TestNG testng.xml
    
    Add all these jars according to your settings.
    

    【讨论】:

    • 我尝试添加 jars 仍然是同样的问题,我收到这些错误 Java File not found exception file system cannot find the specified file AND TESTNG[ERROR] No test suite or test case to run
    • 我认为它无法找到您的测试类的路径。在我的情况下,构建路径是 /src 并且包括 。我的项目结构是/src/scripts/。请检查这个。
    猜你喜欢
    • 1970-01-01
    • 2012-04-21
    • 1970-01-01
    • 1970-01-01
    • 2020-11-30
    • 1970-01-01
    • 1970-01-01
    • 2015-11-25
    • 1970-01-01
    相关资源
    最近更新 更多