I'm an QA intern at the moment at an insurance company and I'm doing some tests on the company's website. I have done many cases and now they're asking for data driven tests which I'm struggling with.
I have done all my tests as;
1 TestFixture
Tests for each page that is in the testcase.
Like this;
[TestFixture]
public class Test : BaseClassForTheTest
{
[Test, Order(1)]
TestcodeForHomePage
[Test,Order(2)]
testcodeForNextPage
}
So I need to run the full test, for many datas from excel file. I'm using NUnit as you might have noticed.
The real question is, how can I pass a DataTable into the TestFixture and make test blocks run for the datatable.
On the run, the first test block will run for the first row on the datasheet named MyTable and the second test block will run for the first row of the datasheet named SecondTable. Since these tests are triggered by the previous test block, I can't give datasource to the Test blocks.
I've looked up on the internet but couldn't find anything about passing a Datatable into the TestFixture. Thanks in advance people :)
Aucun commentaire:
Enregistrer un commentaire