'da veri odaklı sınama sorunları ile ilgili sorunlar C# ile MSTest/Selenium'da çalışmak için veriye dayalı sınama denemeye çalışıyorum. İşte MSTest
[TestClass]
public class NewTest
{
private ISelenium selenium;
private StringBuilder verificationErrors;
[DeploymentItem("GoogleTestData.xls")]
[DataSource("System.Data.OleDb",
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=GoogleTestData.xls;Persist Security Info=False;Extended Properties='Excel 8.0'",
"TestSearches$", DataAccessMethod.Sequential)]
[TestMethod]
public void GoogleTest()
{
selenium = new DefaultSelenium("localhost", 4444, "*iehta", http://www.google.com);
selenium.Start();
verificationErrors = new StringBuilder();
var searchingTerm = TestContext.DataRow["SearchingString"].ToString();
var expectedResult = TestContext.DataRow["ExpectedTextResults"].ToString();
...
benim hata var: İşte kodumu bazıları kurmak için çalışan bir örneğidir Bir nesne başvurusu statik olmayan alan, yöntem veya özellik 'için gereklidir 3 Hata Microsoft.VisualStudio .TestTools.UnitTesting.TestContext.DataRow.get' E: \ Projects \ SeleniumProject \ SeleniumProject MaverickTest.cs 32
hata hem tabloların "TestContext.DataRow" bölümünü altını edilir 33 SeleniumProject \. Gerçekten bununla mücadele ediyorum, teşekkürler!
Ben kasap almadan oraya kodunu nasıl emin değilim? üzgünüm herkese – Jacob