Generic test: multiple forms and data source?

Best practices, code snippets for common functionality, examples, and guidelines.
Posts: 1
Joined: Sun Mar 29, 2020 7:57 am

Generic test: multiple forms and data source?

Post by steve75 » Sun Mar 29, 2020 9:58 am

In out team we have test where we fill and validate forms, for this we build generic test where we use smart folders and data sources. This works fine for one form, but problems arise when we add another forms (at least in our solution). Form input data is in CSV files and in our system we have many many forms.

Current scenario for 1 form which works fine:
Test case1:
-Smart folder 1 (fill) --> CSV file 1
- Smart folder 2 (validate) --> CSV file 2

How could another forms be added to test? The all can use test case 1 structure. I have find only two solution:
- Copy paste existing test case structure for each form needed then data can be from different CSV files. Problem is that structure of test cases is complex, multiple conditional smart folders and much of bindings.

Solutions which I would like to use instead of this copy paste but haven't figured out how they can be used or if the can:
- Use run configuration for different CSV files
- Use run configurations for row numbers (if we put all form data to one CSV file)
- Use command line execution and give there data source name to be executed
- Having row number selection in test suite iteration (in iteration 1 run row 1-100 and 2nd round 101-200 etc)
- Other ideas?



Re: Generic test: multiple forms and data source?

Post by Vega » Wed Apr 01, 2020 6:43 pm


May I ask if you are trying to fill out a single form and then validate a single form one by one (1:1) or are you filling out many forms and then validate them after? If you are OK with filling out many forms and then validating them all after filling them out, then your current structure would be OK. If you want to fill out and then validate one form at a time, I believe the most simple approach would be to combine your data. I would imagine some of this data would likely overlap anyways so hopefully this approach would not require too much work.

I think several of your suggestions would work, but you would end up with a lot of clutter in your test suite with the extra containers which would probably be best to avoid. The easiest most straight forward answer I can think of would be to combine your data into one file. Then with each row of data you can fill out a form as well as validate it. With a combined data source you could have a more simplified structure such as:

Test case1:
-Smart folder 1 (fill & validate) --> CSV file 1

hope this helps