data-driven-tests

Data-driven unit tests with google test

大兔子大兔子 提交于 2019-11-26 21:37:13
问题 I am currently writing unit tests for an embedded application using googles unit test framework. Now my boss got upset that the data I test with (i.e. the values with which I call methods of the class under test) is hard wired in the tests. He requests to have this data read-in from a file. His argument is that it would thus be easier to add another test for a corner case that was previously forgotten. I am not that experienced with unit tests but so far that was not how I did it. So I tried

CodedUI test does not read data from CSV input file

依然范特西╮ 提交于 2019-11-26 17:51:37
问题 I am having difficulty mapping a CSV file with the Coded UI test method. This is most likely a stupid question but I cannot seem to find a solution for my problem, at least not one that works. I have made sure to set the property of the CSV file to Copy always . I have also imported the CSV file by writing the following line above the test method. [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Data\\login.csv", "login#csv", DataAccessMethod.Sequential),

How to RowTest with MSTest?

一世执手 提交于 2019-11-26 17:42:34
I know that MSTest doesn't support RowTest and similar tests. What do MSTests users do? How is it possible to live without RowTest support? I've seen DataDriven test features but sounds like too much overhead, is there any 3rd party patch or tool which allow me to do RowTest similar tests in MSTest ? [TestMethod] Test1Row1 { Test1(1,4,5); } [TestMethod] Test1Row2 { Test1(1,7,8); } private Test1(int i, int j, int k) { //all code and assertions in here } I know this is a late answer but hopefully it helps others out. I looked everywhere for an elegant solution and ended up writing one myself. We

How to use a list of values for a parameter?

江枫思渺然 提交于 2019-11-26 14:55:34
问题 I am using the test plugin for VS 2012 (although have just installed 2013), and need to know: Is it possible to have a parameter pass a different value from a selected list while load testing? I have used the sample load test located here: http://www.visualstudio.com/get-started/load-test-your-app-vs and created a new web test that meets my needs as below. I have a simple journey recorded that is an email registration web page. The journey is essentially completing name & address, email, conf

How to run a test many times with data read from .csv file (data driving)

家住魔仙堡 提交于 2019-11-26 12:33:16
I am trying to automate some testing for one of our web applications and I need to know how I can make my Coded UI project read data from a CSV file. Lets say I want to test a log in screen. My CSV file will contain a few user names and passwords. I want my Coded UI test to read these log in details and loop through them to run the test on each set of data. AdrianHHH The web has many tutorials on data driving Coded UI tests. The basic steps for data driving with a CSV file are as follows. Create the CSV file. Add the CSV file to the project. Make sure the CSV file is deployed. Add the CSV file

How to RowTest with MSTest?

懵懂的女人 提交于 2019-11-26 05:32:08
问题 I know that MSTest doesn\'t support RowTest and similar tests. What do MSTests users do? How is it possible to live without RowTest support? I\'ve seen DataDriven test features but sounds like too much overhead, is there any 3rd party patch or tool which allow me to do RowTest similar tests in MSTest ? 回答1: [TestMethod] Test1Row1 { Test1(1,4,5); } [TestMethod] Test1Row2 { Test1(1,7,8); } private Test1(int i, int j, int k) { //all code and assertions in here } 回答2: I know this is a late answer