当它们之间没有任何关系时,如何在两个硒文件之间连续运行 [英] how to run two selenium java files on after the other continuously when they dont have any relation in between them

查看:54
本文介绍了当它们之间没有任何关系时,如何在两个硒文件之间连续运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Web应用程序,已使用TESTNG在管理模块和用户模块上针对Selenium进行了自动化测试.现在,我需要一个接一个地连续运行Java文件(第一个管理员,然后是用户模块).它们之间没有共同的方法.我只想在管理模块完成运行后立即运行用户模块java文件.

I have a web application for which I have done automation tests in Selenium using TESTNG on admin module and user module. Now I need to run the java files continuously one after the other(1st admin then the user module). No methods are common between them. I just want to run the user module java file as soon as the admin module has finished running.

推荐答案

使用测试框架是可取的,但是,即使您不感兴趣,也可以创建一个独立的类,从main方法中,通过以下方法调用测试类的main方法:一根据您的要求.很简单:)

Using Testing framework is preferable, still if you are not interested, you can create a standalone class, from the main method, call your test class's main method one by one as per your requirement. Simple :)

这篇关于当它们之间没有任何关系时,如何在两个硒文件之间连续运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆