繁体   English   中英

如何使用 Gradle 为 Selenium TestNG 项目创建具有依赖项的可执行 JAR?

[英]How can I create an executable JAR with dependencies using Gradle for a Selenium TestNG project?

我想在具有所有依赖项的单个可执行 JAR 中构建我的 Selenium WebDriver TestNG 项目。

如何使 Gradle 项目将所有依赖项 JAR 打包到我的输出 JAR 中?

You neeed to write testrunner clas and by running that you will get jar files of selenium project

    package TestNGRunner_ExecutableFile;

import ExtentReports.ExtentReporterNG;
import WorldAirfaresTests.Footerlinks;
import WorldAirfaresTests.HeaderLinks;
import org.testng.TestNG;

public class TestRunner {


    static TestNG testNg;
    public static void main(String[] args) {

        ExtentReporterNG rep=new ExtentReporterNG();

        testNg=new TestNG();

        testNg.setTestClasses(new Class[]++++++.class, ++++++.class});
        testNg.addListener(rep);
        testNg.run();
    }
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM