我刚开始自动化测试。我正在使用Katalon测试一个端到端的功能,允许用户上传他们的文件并获得分析报告。下面是一个快速的流程:
身份验证->单击上载文件->单击Add Files ->单击Next ->单击Submit
是否有编写和安排测试用例和测试套件的指导方针?现在,我编写测试用例如下:
编写这样的测试用例可以吗?还是测试用例应该是相互独立的?例如,
在本例中,我将把这些测试用例放到Test中,以便它们按顺序执行:
测试套件1:调用测试用例1 ->调用测试用例2 ->调用测试用例3 ->调用测试案例4 ->调用测试用例5
哪一个更可以接受?如有任何建议,将不胜感激:)
发布于 2018-11-28 10:12:54
我更喜欢让测试保持独立和尽可能独立,这样我就不会将测试用例从另一个测试用例中调用。
我的测试是使用关键字构造的,因此它们看起来如下:
但是,由于您的测试只包含一次单击(据我所知),您可以这样做:
步骤1:
myMethods.authetication(username, password)第2步:
WebUI.waitForElementClickable('id of the upload button')
WebUI.click('id of the upload button')
WebUI.verifyElementNotPresent('id of the upload button')第3步:
WebUI.waitForElementClickable('id of the add files button')
WebUI.click('id of the add files button')
// verify expected condition第4步:
WebUI.waitForElementClickable('id of the next button')
WebUI.click('id of the next button')
// verify expected condition第5步:
WebUI.waitForElementClickable('id of the submitbutton')
WebUI.click('id of the submit button')
// verify expected conditionhttps://stackoverflow.com/questions/53514717
复制相似问题