Headless mode - Databinding

1 Answer 127 Views
General Discussions
Nithya
Top achievements
Rank 1
Veteran
Nithya asked on 18 May 2021, 08:39 AM

Hi, 

I have Databinding to my tests which picks the data from the excel or from localdata of the test. But databinding is not working when running in headless mode. 

Could you Please let me know if there are someways to fix this ? Thanks!

 

Regards,

Nithya A.

 

Elena
Telerik team
commented on 18 May 2021, 09:40 AM

Hello Nithya, 

I am sorry to know you are having any troubles with the headless test runs and am curious to sort these out. 

In the general case we haven't encountered any issues with data driven tests executed in headless mode.

Therefore, I will appreciate if you take the time to elaborate further details on the occurrence:
- do you run the tests in Quick run mode, or from a test list?
- what result is being generated for the test run in headless mode? 
- do you see multiple iterations listed in the result? 
- if you execute that same test in the same way, but using a UI browser mode, can you see all iterations running?
- or the test is generally failing when executed in headless mode? 
- collect the step failure details or execution log (here is where to find it for the test list run) from the headless test execution and send these zipped with your response.

Nithya
Top achievements
Rank 1
Veteran
commented on 19 May 2021, 09:29 AM

Hi Elena,
- I run the test from the test list
- My step is about creating a new document. The steps are shown as passed. But when I go and check it in my system, the document is actually not created
- There are no problem with the iterations
- UI Browser mode for the same test have no problem
- The document is not created. But it show as step is passed
- I used the "capture browser state" to see , what is happening. I could see that there is a extra suffix when searching for the name or product. Eg : I search for some name or number using my data in the excel. (123456 , Test)
But the test search as "123456 Non" , "Test Non". I am not sure what is this "Non" ? and where it is coming from. It is because of this "Non" suffix added automatically to my data, the test is failing or the document is not created.

Could you please help me to fix this ? Thanks!

Regards,
Nithya A.
Nithya
Top achievements
Rank 1
Veteran
commented on 20 May 2021, 09:47 AM

Hi Elena,
I did a further investigation with these test and came with some tips to reproduce this. I feel that the issue is not with "Databinding". But with the "keypress". After entering the data in the lookup field, I press some keys (space,down,enter) to select the data. These keys causes the issue of extra suffix "Non". Now I removed the "keypress" steps and added some recorded steps to select the data which works fine.

These are just my findings. Not completely sure about this. Could you please check on this. Thanks!

Regards,
Nithya A.
Elena
Telerik team
commented on 21 May 2021, 12:42 PM

Hi Nithya, 

Thanks for the follow up message and drilling down the issue to the key press steps. I will explore this on my end and will let you know my findings at the beginning of next week. 

Thank you for your cooperation once again.

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 25 May 2021, 01:31 PM

Hi Nithya,

Thank you for your cooperation in our discussion. 

With the help of your additional comments we focused on the key press steps and not the data binding. In general, we do not recommend using the key press steps, as these could easily lose focus and be sent to an incorrect element. The specifics of these steps and automation scripts make the key presses not quite reliable. I am sorry I didn't mention this earlier, but last week was quite busy on my en and when you reported you have found a workaround, I just left the discussion aside. 

Anyways, based on the shared details for the steps, I assume that the automated control is an autocomplete dropdown. So I tested few sample pages across the web and didn't have troubles with executing the steps in headless mode even using the key press steps. Though, I have to admit that none of the dropdowns required pressing the Space key. And each time I tried to press this key it was considered as part of the entered text for the enter text step. Possibly, it could be the Space that added the additional text.  

So, having all these notes in mind, I suspect that there is something specific for the particular page under test and I wonder if it is any possibility to share this one along with a test. As this is a public thread we can switch the discussion in a private support thread, if necessary. 

On top of this, I would recommend you leave the test as you modified it already and use the recorded steps in the long run. If you used the key presses because of the data driven approach and had troubles with finding the correct item from the list to select for each iteration, I guess you can data drive the recorded steps as well. Possibly,  you might need to data drive the find expression of the list item as well. 

I hope this information is helpful for you. Do not hesitate to get back with any questions you may have.

Thank you once again for your time. 

Regards,
Elena
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at https://learn.telerik.com/.
Tags
General Discussions
Asked by
Nithya
Top achievements
Rank 1
Veteran
Answers by
Elena
Telerik team
Share this question
or