5

Data driven tests work well when you have a lot of test cases that can be expressed as points in a parameter space. Some advantages of data-driven approach are: Test cases are easier to add or remove than when they are expressed as code You duplicate less test code and consequently are less susceptible to code/paste errors in your test code Someone other ...


5

Difference between Keyword driven and Data driven framework : Data Driven Framework : It is nothing but data driven test, performing the same functionality with multiple input values by using parametarization with the help of data table or data source is called Data Driven Test. While automating or testing any application, at times it may be required to ...


4

In this scenario; you have two options to test your Authentication scenario for multiple test data's: 1) Use Data provider with two-dimensional java object 2) Passing data to DataProvider from Excel sheet 1) Use Data provider with two-dimensional java object: Data provider returns a two-dimensional java object to the test method and the test method will ...


4

I think Shailendra hit the nail on the head. The main goal of keyword driven tests is greater test coverage through reuse and maintanability through defining functionality -- steps. And the main goal of data driven tests is greater test coverage through multiplying scenarios. It really depends on how your features are structured -- are most scenarios much ...


4

The best explanation would be an example - if you have a situation of needing to test something - like a login page - where the steps of the tests don't vary but the input (and output) does then having a data driven test is a lot better then many test cases where the only differences are - in the login page example - users and passwords. This can be ...


4

Update I have tested with a simple CSV file and it indeed alters the iteration count automatically. So my suggestions for you are: update Postman to latest version if not yet done so double-check your CSV, is the data in a correct format? I think this is a probable cause. Can you share it? Original answer In Postman, go to the menu Collection and select ...


3

In excel sheet always start with 0-column and 0-row and index 0 as well. Change data[i][0]=conf.getData(1, i, 0); data[i][1]=conf.getData(1, i, 1); data[i][2]=conf.getData(1, i, 2); to data[i][0]=conf.getData(0, i, 0); data[i][1]=conf.getData(0, i, 1); data[i][2]=conf.getData(0, i, 2);


3

I am going to go out on a limb here, quite likely in a minority opinion, but here I go! I avoid using them! Now I notice your first bullet point mentioned: Am I missing out on something, or are data driven patterns overrated? Yes, to they are. I frequently have junior engineers approach me breathlessly when they discover it and show me what they've ...


3

There are many, many approaches, each having its pros and cons when it comes to simplicity of reading, easiness of modifying data, easiness of modifying data schema (refactoring), easiness of parsing data, type of data you want to model. If you were I would experiment. I would pickup the simplest approach (properties) to see if fits your problem. Here's the ...


3

Nose supports parametric/generative tests, http://readthedocs.org/docs/nose/en/latest/writing_tests.html#test-generators For example: def checker(combination): # do something to verify the combination assert 'A' in combination def test_generator(): options = ['A', 'B', 'C'] for o in options: yield checker, o for p in ...


3

I was able to accomplish this by writing a custom TestClassExtensionAttribute and then calling a custom ITestMethodInvoker from the TestExtensionExecution. I answered a similar question on SO about this: https://stackoverflow.com/a/14673329/573218 I have posted the code on GitHub and am working on cleaning it up a bit: https://github.com/johnkoerner/...


3

Always approach this from your test objectives which should be taken directly from your requirements. You have one usecase, but his has multiple scenarios. Your usecase, 'Check mobile bill payment after due date' is actually quite weak. It is ambiguous in many ways, all tests should follow Hoare logic which is easily done using BDD for your test scripts ...


2

Don't start with designing framework: YAGNI principle applies. Start coding. Implement tests, refactor common parts - and framework will emerge. Difference is, this framework will have only features you need. By definition, if you have to ask how to design a testing framework (don't already have skills to do it right), you should not try to foresee what you ...


2

Welcome, Aakash! TestComplete offers you two possible ways that can be used to create data-driven tests: DB Table variables (Database tables or queries, Excel files, CSV files) Table variables DDT program object How to perform data-driven testing: Create a TestComplete project Record an automated test Modify the Data-Driven Test and Assign Input Values ...


2

Since this question was cross-posted to stackoverflow, I'll cross-post my answer: Unfortunately, the use of test templates more-or-less require that the data is hard-coded in the test case. However, the test template is not much more than a wrapper around a for loop. You could do something like this: | | ${database_rows}= | Run sql query | | ... | Select * ...


2

First of all:There is no best approach. There are just several approaches and you have to decide which one is your favorite. What is the best approach to make test data configurable ? Through XML file or properties file or any other way. But must not be hard coded. I like it to put the test data in properties files, read the data and put them ...


2

I guess I have never build any "real" data driven test suits, unless you count build some arrays which I feed into function data driven. In my book this perfectly counts as data driven. In fact, tabular data is what most people think of when talking about data driven tests: origin destination firstname lastname ------------------------------------------ ...


2

One example: Data driven testing is useful for performance or load testing. This is where many (often hundreds or more) simulated users run a small number (often less than ten) test cases against a server. Commonly these tests cases are data driven with user-name and password, so each simulated user logs in as a different user.


2

I do not claim to be expert, just try to do due diligence research before diving in, and use best practices, so... :-) IMHO start by trying to implement a pattern is wrong approach (trying to force pattern into solution). I start with "exploratory coding" and try to get the feeling what would be best approach (maybe after I have few years of experience with ...


2

This is quite an old but very interesting question which has surprisingly has no answers at all. Let me add my attempt here that will probably help someone who will face the same issue. Personally I can see some excess elements in the provided schema. It is a good choice to store test data in XML since it allows to have a structure unlike the key-value ...


2

You develop it just like anything else you would program. Learn the different parts and combine them together. Learn C#: http://www.learncs.org/ Learn how to read data from Excel with C#: https://stackoverflow.com/questions/15793442/how-to-read-data-from-excel-file-using-c-sharp Learn how to drive a test with Selenium in C#: https://stackoverflow.com/...


2

Purpose of keyword driven frameworks compared to data driven frameworks. Keyword-driven testing is a technique that separates much of the programming work from the actual test steps so that the test steps can be developed earlier and can often be maintained with only minor updates, even when the application or testing needs change significantly. The keyword-...


2

I am not really sure what you meant by Interim Test Expectation, did you mean Checkpoint? Sure you can do it, you can do something like this: TestName Date1 Date2 FirstName1 etc Checkpoint1_Result End_To_End_test xxx xxx xxx Pass/Fail Whether it should be a pass or fail, depends on your test design. A checkpoint is an ...


2

I've definitely seen people (and have done so myself), where the data file contains response codes, strings, final states, etc. All depends how general of a solution you want, if you want to run positive/negative, etc.


2

If you are moving forward for automation approach, applying BDD with "Scenario Outline" feature to your case, it can be fit in one readable scenario. Scenario Outline: Bill payment after due date Given <operator> bill, due date is <dueDate> When payment is made today Then payment is <result> Examples: | operator | ...


2

If I understand correctly - You want to check if some particular WebElement is missing. While doing so you get a NoSuchElementException. The solution here will be to create a function that returns a boolean value if an element is present. Something like this: public boolean isPresent(By locator) { try { webDriver.findElement(locator); ...


1

You have to implement test cycles as you are doing data-driven testing. I recommend to you not to expect the test will pass every time. You will have to implement checkpoints, using sequences of storeElementPresent to a variable, compare if the variable is "true" with if and store the test cycle result to the javascript array, or report results by echo-ing ...


1

One TestNG approach is to use Parameterized Tests See https://www.tutorialspoint.com/testng/testng_parameterized_test.htm Another interesting feature available in TestNG is parametric testing. In most cases, you'll come across a scenario where the business logic requires a hugely varying number of tests. Parameterized tests allow developers to run ...


1

When the growth of your data leads to a situation where managing the data is becoming burdensome, one option that I would consider would be moving to a formal database for storage of that information. You could have various tables to store the data. You will need a UI to manage the data of course. With mySQL that could simply be SQLworkbench (free). ...


1

I was using the @Unpack decorator on @data(("employeeeee"),("testeeer")) def test_adding_client(self,naming): Looks like the unpack decorator should be used when there are more than one arguments @data(("employeeeee","CEO"),("testeeer","CFO")) @unpack def test_adding_client(self,naming,position1):


Only top voted, non community-wiki answers of a minimum length are eligible