[英]How to use TestNG annotations when the framework is Hybrid and test cases are driven by excel in Selenium?
When I use a Hybrid framework using Selenium where my test cases are driven by Excel, how can I use TestNG annotations like @Test for my test cases which are in Excel format? 当我使用Selenium的混合框架,我的测试用例由Excel驱动时,我如何使用@Test等TestNG注释来处理Excel格式的测试用例? Meaning, I have all my test steps converted in Excel as Element, Action and Data combination to trigger an action in UI. 这意味着,我将所有测试步骤在Excel中转换为元素,动作和数据组合,以触发UI中的操作。
I will be calling a method in main() which in turn calls another method where the reading of Excel and converting the set of rows/columns to frame the Selenium command to trigger events for a test case flow. 我将在main()中调用一个方法,该方法又调用另一个方法,其中读取Excel并转换行/列集以构建Selenium命令以触发测试用例流的事件。 Given this, how/where can I mention @Test to let TestNG that this is my test method? 鉴于此,我如何/在哪里可以提到@Test让TestNG这是我的测试方法?
I have 1000+ test cases to execute and planning to use Selenium GRID for distributed execution in multiple VMs. 我有1000多个测试用例要执行并计划使用Selenium GRID在多个VM中进行分布式执行。 In order to do this, I believe we need to have TestNG to let Selenium GRID know that these are my test methods. 为了做到这一点,我相信我们需要让TestNG让Selenium GRID知道这些是我的测试方法。 Any help on this regard is highly appreciated. 对此方面的任何帮助都非常感谢。
Regards, Bala 此致,巴拉
Stop wasting time on excel driven solutions. 停止在excel驱动的解决方案上浪费时间。 Write normal code for elements and actions. 编写元素和动作的正常代码。 Combine them in your tests. 在测试中将它们组合在一起。 Feed with data which will be populated to the forms. 使用将填充到表单的数据进行提要。 That's all. 就这样。 There are a lot of frameworks which make it an easy task. 有很多框架使它成为一项简单的任务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.