Data Driven testing is an important aspect of writing automated test cases for any tool. I have been experimenting with testcafe lately and haven't been able to find a convincing way of doing data-driven tests i.e. executing a test for different inputs.
I came across this example: https://testcafe-discuss.devexpress.com/t/multiple-execution-of-one-test-with-different-data/219 but in the above example, we are dealing with different login usernames as inputs. If I imagine a scenario where I have to check a list of elements appear on the page or not, I would surely have some steps leading to the validation; in which case I may not want to execute the leading steps each time a new input is passed. In the above example looks like the input is at a test case level and not at a test step level because we put the test case inside the for loop and therefore all the validation/navigational points will be executed whether I want to repeat them or not
Since, I am new to testcafe, and going over scattered documentation, my question is - for data-driven testing is that the only approach we have in test cafe? or there is something more convincing, non-verbose approach in testcafe- if yes could someone point me to the documentation for it?