Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Field with empty value did not hide


#1

I have imported test cases which contain empty value in preconditions.
The result is that some cases do hide the preconditions but some don’t.
Some cases shows the preconditions label without any value.
For those cases which did not hide the “preconditions” field, if I edit it and then save without changing anything, then it will hide the “preconditions” field.

What’s happening?

Any idea?

Thanks.
Alston


#2

Hello Alston,

Thanks for your posting. The issue is likely that the fields were not really empty during the import (but had whitespaces, for example). TestRail’s UI ignores (trims) the whitespace characters and this explains the behavior you’ve seen after saving the test case in the UI. One solution is to make sure that the import files use empty XML elements for empty fields. You can alternatively also leave out empty fields and this would have the same effect.

I hope this helps!

Regards,
Tobias


#3

[quote=tgurock]Hello Alston,

Thanks for your posting. The issue is likely that the fields were not really empty during the import (but had whitespaces, for example). TestRail’s UI ignores (trims) the whitespace characters and this explains the behavior you’ve seen after saving the test case in the UI. One solution is to make sure that the import files use empty XML elements for empty fields. You can alternatively also leave out empty fields and this would have the same effect.

I hope this helps!

Regards,
Tobias[/quote]

Hi Tobias,
Thanks for your reply but this is not the case.

I have check the value is empty without space.
When I click the edit button, there is empty in preconditions not even a space.
And also we import with empty value XML.
e.g.

I also try to export the cases (some hide preconditions and some show preconditions without value)
to XML file and I got all of this cases with empty value in

Thanks.
Alston


#4

Hello Alston,

Thanks for your reply. Depending on the XML viewer/editor you use, the elements might appear as empty (e.g. with Internet Explorer) but my guess is that the elements would have spaces when being viewed in a text editor. It’s already planned to look into removing/ignoring empty XML elements from the import and we would like to add this to one of the next versions.

Regards,
Tobias


#5

[quote=tgurock]Hello Alston,

Thanks for your reply. Depending on the XML viewer/editor you use, the elements might appear as empty (e.g. with Internet Explorer) but my guess is that the elements would have spaces when being viewed in a text editor. It’s already planned to look into removing/ignoring empty XML elements from the import and we would like to add this to one of the next versions.

Regards,
Tobias[/quote]

Thanks for your reply. I do check all those cases in text editor (notepad) and it does not contains any value ()

Thanks.
Alston


#6

Thanks for the additional details, Alston. We will make sure to review this again, thanks again for your feedback on this!

Regards,
Tobias