Your Privacy
We use cookies to give you a better experience in Alchemy Help Center
You can learn more about what kind of cookies we use, why, and how from our Privacy Policy. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings in our cookie banner to change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer. For more details, check out our Privacy Policy link below.
View Privacy Policy
Strictly Necessary Cookies
These cookies are necessary for the website to function and cannot be switched off in our systems, but do not store any person information. They are usually set in response to your actions that triggers a request for services, such as setting your privacy preferences, logging in or filling forms. You can change your browser settings to alert you about these cookies, but some parts of the Website may not work.
View Cookies
Is it possible to create a test that reads data from a file and uses the data to fill out a form?
0 Votes
Mason posted 5 months ago Best Answer
Yes, Alchemy has some great features in this area. Alchemy supports the creation of data-driven-tests. You can parameterize the inputs to your form, and it is pretty easy and intuitive to do. There are several different data sources you can create: CSV, Synthetic, or Static. It is a lot to write about here. I would suggest watching the YouTube video series for Data-Driven Testing in Alchemy:
Part 1 - Using Data Files
Part 2 - Using Synthetic Data
Part 3 - Creating Synthetic Data
If you want to run the same test logic, but over multiple rows of test data, you would probably store your test data in a spreadsheet, then save it as a .csv (Comma delimited) file. Now, inside the Alchemy client, head over to the Data tab. There, you can add a data source of type:CSV, and point it to your csv file. Alchemy will read the data from the file, and show you a representation of the content.
Now that you have created the data file, and created the data source in Alchemy, the next step is to use the data in your test. Here, I assume that you have recorded the test already and the steps contain the values you typed into or selected in the form at the time of recording. Locate the Data Toolbox drawer on the right side of the Alchemy client, and click on it. Now expand the Data section of the Data Toolbox. You should see one or more tables, depending how many data sources you created. Expand the appropriate table and drag, for example, the 'FirstName' column into your test step that types the first name into the form. Continue for all the other data elements that are hardcoded into your recorded script, dragging the appropriate column into the test step's value field where the recorded data appears.
Finally, to make your test run for each row of test data, click on the Pencil at the top left of your test canvas. That will open the "Test Information" dialog. Near the bottom is a "Loop Data" section. Use the pulldown to select your data table.
Congratulations, you now have a data driven test. When you run this test in the suite, from the command-line interface, Each row of data will equate to one test.
You could also use the data source in other ways. For example you could iterate over your data using a Repeater action in Alchemy. Like I said, Alchemy has a lot of features around data, there is a lot to talk about. Check out the videos I linked earlier in this answer.
1 Votes
1 Comments
Mason posted 5 months ago Answer
Yes, Alchemy has some great features in this area. Alchemy supports the creation of data-driven-tests. You can parameterize the inputs to your form, and it is pretty easy and intuitive to do. There are several different data sources you can create: CSV, Synthetic, or Static. It is a lot to write about here. I would suggest watching the YouTube video series for Data-Driven Testing in Alchemy:
Part 1 - Using Data Files
Part 2 - Using Synthetic Data
Part 3 - Creating Synthetic Data
If you want to run the same test logic, but over multiple rows of test data, you would probably store your test data in a spreadsheet, then save it as a .csv (Comma delimited) file. Now, inside the Alchemy client, head over to the Data tab. There, you can add a data source of type:CSV, and point it to your csv file. Alchemy will read the data from the file, and show you a representation of the content.
Now that you have created the data file, and created the data source in Alchemy, the next step is to use the data in your test. Here, I assume that you have recorded the test already and the steps contain the values you typed into or selected in the form at the time of recording. Locate the Data Toolbox drawer on the right side of the Alchemy client, and click on it. Now expand the Data section of the Data Toolbox. You should see one or more tables, depending how many data sources you created. Expand the appropriate table and drag, for example, the 'FirstName' column into your test step that types the first name into the form. Continue for all the other data elements that are hardcoded into your recorded script, dragging the appropriate column into the test step's value field where the recorded data appears.
Finally, to make your test run for each row of test data, click on the Pencil at the top left of your test canvas. That will open the "Test Information" dialog. Near the bottom is a "Loop Data" section. Use the pulldown to select your data table.
Congratulations, you now have a data driven test. When you run this test in the suite, from the command-line interface, Each row of data will equate to one test.
You could also use the data source in other ways. For example you could iterate over your data using a Repeater action in Alchemy. Like I said, Alchemy has a lot of features around data, there is a lot to talk about. Check out the videos I linked earlier in this answer.
1 Votes
Login or Sign up to post a comment