I have some web ui tests in C# which are executed through selenium in browserstack. Currently these are just simple unit ms tests and they are executed againts different browsers. I want to port the test to specflow, but I don't really know how to do the multiple browser testing bit.
At the moment, to execute these tests in multiple browsers I am using a DataSource attribute, which basically takes different inputs for the same tests from an XML file
[TestMethod]
[Ignore]
[DeploymentItem("JLL.Specs\\Browsers.xml")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.XML", "|DataDirectory|\\Browsers.xml", "Row", DataAccessMethod.Sequential)]
public void LoadHomePageAndFindSearchBox()
{
...
}
The problem is that Specflow doesn't support the DataSource attribute. Any idea?
This is the XML file:
<?xml version="1.0" encoding="utf-8" ?>
<Rows>
<Row>
<browser>Firefox</browser>
<browser_version>31.0</browser_version>
<os>Windows</os>
<os_version>7</os_version>
<resolution>1280x1024</resolution>
<browserName></browserName>
<platform></platform>
<device></device>
</Row>
<Row>
<browser>Chrome</browser>
<browser_version>36.0</browser_version>
<os>Windows</os>
<os_version>XP</os_version>
<resolution>1024x768</resolution>
<browserName></browserName>
<platform></platform>
<device></device>
</Row>
...