data-driven-tests

How to feed a list of lists as an argument into a Robot Framework Test Template

会有一股神秘感。 提交于 2020-02-21 06:47:08
问题 I have the template keyword for my "do any combination" test, where ${labels} is a list and ${versions} is a list of lists: TT Process Instance Version Search [Arguments] ${labels} ${versions} Login Process Instance Version Search ${labels} ${versions} Then I create a test-suite file and place the following: *** Settings *** Test Template TT Process Instance Version Search *** Variables *** @{ProcessVersions} = ${Process0} ${Process1} ${Process2} @{SingleVersion} = ${Process2} @{Process0} = 1

Data-Driven Unit Test from Excel Spreadsheet

坚强是说给别人听的谎言 提交于 2020-01-22 00:24:37
问题 How do I set up a data-driven unit test method in VS2012 that reads data from an Excel .xlsx spreadsheet? I have tried Googling the solution but the results are either referring to an older version of Visual Studio or are not for .xlsx files. So far I have a test class, test method, and the data source file, TestData.xlsx which is copied to the output directory at build time. 回答1: Figured it out on my own. Give your test method the following attributes: [DeploymentItem("TestData.xlsx")]

Why does data driven unit test fail in vs2012 when it worked fine in vs2010?

二次信任 提交于 2020-01-20 06:11:28
问题 I have some data driven unit tests that were working just fine in Visual Studio 2010. These tests were implemented using the following pattern. [TestMethod()] [DeploymentItem("path_to_data_dir_relative_to_solution\\my_data.xml")] [DataSource("Microsoft.VisualStudio.TestTools.DataSource.XML", "|DataDirectory|\\my_data.xml", "Token", DataAccessMethod.Sequential)] public void MyTestMethod() { // Arrange const string EXPECTED_PARAM_NAME = "table"; string data = TestContext.DataRow["Data"]

Why does data driven unit test fail in vs2012 when it worked fine in vs2010?

妖精的绣舞 提交于 2020-01-20 06:11:05
问题 I have some data driven unit tests that were working just fine in Visual Studio 2010. These tests were implemented using the following pattern. [TestMethod()] [DeploymentItem("path_to_data_dir_relative_to_solution\\my_data.xml")] [DataSource("Microsoft.VisualStudio.TestTools.DataSource.XML", "|DataDirectory|\\my_data.xml", "Token", DataAccessMethod.Sequential)] public void MyTestMethod() { // Arrange const string EXPECTED_PARAM_NAME = "table"; string data = TestContext.DataRow["Data"]

Data-driven tests with jUnit

℡╲_俬逩灬. 提交于 2020-01-09 06:21:15
问题 What do you use for writing data-driven tests in jUnit? (My definition of) a data-driven test is a test that reads data from some external source (file, database, ...), executes one test per line/file/whatever, and displays the results in a test runner as if you had separate tests - the result of each run is displayed separately, not in one huge aggregate. 回答1: In JUnit4 you can use the Parameterized testrunner to do data driven tests. It's not terribly well documented, but the basic idea is

Data-driven tests with jUnit

蹲街弑〆低调 提交于 2020-01-09 06:20:05
问题 What do you use for writing data-driven tests in jUnit? (My definition of) a data-driven test is a test that reads data from some external source (file, database, ...), executes one test per line/file/whatever, and displays the results in a test runner as if you had separate tests - the result of each run is displayed separately, not in one huge aggregate. 回答1: In JUnit4 you can use the Parameterized testrunner to do data driven tests. It's not terribly well documented, but the basic idea is