无法在jenkins中运行参数传递的方法

无法在jenkins中运行参数传递的方法,jenkins,testng,Jenkins,Testng,在我的项目中,我正在使用java和selenium、maven、testng。 对于某些函数,我通过testng参数注释传递了参数。 在通过jenkins构建和执行项目时, 参数传递的方法不是通过jenkins执行的。 其他方法执行良好。 请提供解决方案。等待答复 示例代码 @Test(priority=1) @Parameters({"drivername","driverpath","outputpath","URL"}) public void opendriver(@Opti

在我的项目中,我正在使用java和selenium、maven、testng。 对于某些函数,我通过testng参数注释传递了参数。 在通过jenkins构建和执行项目时, 参数传递的方法不是通过jenkins执行的。 其他方法执行良好。 请提供解决方案。等待答复

示例代码

@Test(priority=1) 
    @Parameters({"drivername","driverpath","outputpath","URL"})

public void opendriver(@Optional("drivername") String drivername,@Optional("driverpath") String driverpath,@Optional("outputpath") String outputpath,@Optional("URL") String URL) 

    in the above code i have passed some parameters through  testng. while executing the code 
    through maven it is working fine. but making build in jenkins and execute the script
     it is not working. Please suggest and advise

日志中没有输出?这些测试被忽视的原因。jenkins中的run命令和您在本地使用的命令有什么不同吗?在本地,我在maven的run配置中使用testsuite选项执行类。在jenkins中,我用corresponding包的testjar设置了类路径,创建了bin文件夹以及可用的类和lib文件,并创建了testngtml