While automating a website, I have a requirement to run a test case(it block) multiple times with different set of testdata in cypress.
Please consider the below example :
`it('example test', () => {
//first run
getOnDefaultForm.typeUserName('Name1');
getOnDefaultForm.typePassword('Pass1');
getOnDefaultForm.clickSubmit();
//second run
getOnDefaultForm.typeUserName('Name2');
getOnDefaultForm.typePassword('Pass2');
getOnDefaultForm.clickSubmit();
//third run
getOnDefaultForm.typeUserName('Name3');
getOnDefaultForm.typePassword('Pass3');
getOnDefaultForm.clickSubmit();
});`
How can I achieve this in Cypress ? Thanks in Advance!
Aucun commentaire:
Enregistrer un commentaire