Test studio data driven testing assertion using lists

I’ve started playing about with Test Studio and I am having difficulty verifying the content of a cell in a list when using a data file.

In the tests I add an assertion to ensure the value in a cell is a certain value. This works when I run the test without a data file.

I then add a data file, select that it is used when the test is run manually and then run the test. The result is that the test fails. It fails on the assertion and the failure reason is “Element not found”.

It does this for any assertion on the value of a cell in a list. I’ve tried it in multiple applications on the controller on different versions but it happens every time.

If I unselect the data file (i.e. untick the “Use data file for manual execution” box) then the test starts working again.

Is this known/expected behaviour? Am I missing something in the data file? It even happens if I download the template and upload it again without even opening it, so I don’t think I’m messing it up.

Thanks,
Duncan

Hi @DBrown ,

Without seeing the construction of your test, there’s a few factors here which might help you get data-driven testing working.

Firstly, there’s the steps taken when interacting with listing elements. With interactions or assertions on listings, you need to specify on the the step setting show that record in the listing is identified. By default I believe this is by Order. It’s possible that when doing your data-driven test, it’s identifying the same row as the recorded row. So might be worth changing that within your step’s settings.

However, based on the error it seems that it’s trying to find something without any luck. That could point towards a configuration issue. The fact it works without data-driven testing, indicates that it could be down to the data you have entered in your spreadsheet, which would be the cause and the error is in fact correct, i.e. ‘Auto’ is not being found as it does not exist on the page.

I’d have a look at the two pointers I’ve made here, otherwise if you feel that the configuration is valid and still coming across this error, I would advise raising a Support Ticket.

Hope this helps :slight_smile:

Thanks for the suggestions @ali.bandali .

I’ve played about with the selection method in the test step, but it has made no difference.

I’m pretty sure it’s not the data file - I’ve downloaded the template and uploaded it again without even opening it, so I can’t see what I could have done to break it. Every other step of the test runs (even validation other text fields in other widgets (not lists)).

I can also see when the test runs that the result is at the top of the list. Indeed, this happens even when there is only one record in the object on which the search is performed.

I’ve opened a support ticket about it so I’ll see what comes of that.

Hi @DBrown ,

Good news! We have released a patch that will resolve this issue for you.

If you could update your application to the latest patch, depending on your platform version then the fix will be applied. Below i’ve listed the patch number for each of the supported platform versions where this patch has been released:
2022.1.218
2021.4.473
2021.3.615
2021.2.865
2021.1.1067

Hope this helps :slight_smile:

Hi @ali.bandali ,

I’ve tried two environments (2022.1.218 and 2021.3.615) and the patches have resolved the issue in both of them.

Thanks very much,
Duncan