Hello
We have automated an test case that adds a "person" to our application. How do I do to use an external source, like Excel, so every run of this test adds an random or sequential person read from this external source?
I need that because the application being tested does not accept 2 equals names and I dont want to think about what other person I have already added to the application on previously tests.
Random names
Re: Random names
You need to read up on the User Guide. See Data Driven Testing...
http://www.ranorex.com/support/user-gui ... sting.html
http://www.ranorex.com/support/user-gui ... sting.html
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: Random names
The user guide does not cover what I want to do. I know how to add a Datasource and bind it to a var. But when I do that it will execute the test for every line on my excel file and that is not what I want. I want to execute the test only once. I know I could set a interval for every test, but this is the same of just typing a different name on each test. Let me explain it better:
3 test cases
1 - Add a person
2 - Add a person with invoice
3 - Add a person with 10 invoices
Each of those tests adds a person, but for every test I want to add a different person reading the names from a excel file sequentially.
3 test cases
1 - Add a person
2 - Add a person with invoice
3 - Add a person with 10 invoices
Each of those tests adds a person, but for every test I want to add a different person reading the names from a excel file sequentially.
Re: Random names
Well, personally I do not use the dataconnector. Rather I interact with my Excel files myself through Interop.
So I think you will need the support team to jump in here to help with this one then.
So I think you will need the support team to jump in here to help with this one then.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
- Support Team
- Site Admin
- Posts: 12174
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Random names
Hello,
You can add the data connector to each of your testcases. In each data source of the different test cases you can define a different data range.
E.g. You have a data source with three names in it. For the first test case you can set the data range to 'From 1 to 1'
If you do so, the test case will only be executed once with the first row of your data source.
In the second test case you can set the data range to 'From 2 to 2' and so on.
I hope I could help!
Regards,
Bernhard
You can add the data connector to each of your testcases. In each data source of the different test cases you can define a different data range.
E.g. You have a data source with three names in it. For the first test case you can set the data range to 'From 1 to 1'
If you do so, the test case will only be executed once with the first row of your data source.
In the second test case you can set the data range to 'From 2 to 2' and so on.
I hope I could help!
Regards,
Bernhard
Re: Random names
OK, but its the same work I would have if I just set the name.
- Support Team
- Site Admin
- Posts: 12174
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Random names
Hello,
Yes, but the advantage is that you only have to change one file if you want to modify the names.
Regards,
Bernhard
Yes, but the advantage is that you only have to change one file if you want to modify the names.
Regards,
Bernhard