Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Tree node checking inconsistent
Tree node checking inconsistent [message #1001179] Wed, 16 January 2013 07:49 Go to next message
Yashveer Rana is currently offline Yashveer RanaFriend
Messages: 15
Registered: November 2012
Junior Member
I am trying to use the check the existence of a node in a Tree component using the 'check existence of node by Textpath' action.

Here is a screenshot of the component.
http://s8.postimage.org/socjvbkb9/problem_marker_1.png

I'm using a regular expression (Errors.*/Chronological.*) for the textpath with a 'matches' operator

On running the test, it fails with a 'Node not found' error.

The weird thing here is, if I try the 'Select Node by Texpath' action using the same regular expression, it works perfectly.

what could I be doing wrong here ?
Re: Tree node checking inconsistent [message #1002196 is a reply to message #1001179] Fri, 18 January 2013 06:39 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

Two things that occur to me as possible causes are:

1. You are using different component names for the different actions, and the check is taking place in another tab
2. Other parameters are different (e.g. you are using "relative" as the path type instead of "absolute")

It might be worth posting the relevant part of the test result report - once for the select, and once for the check.

HTH,
Alex
Re: Tree node checking inconsistent [message #1003115 is a reply to message #1002196] Sun, 20 January 2013 09:27 Go to previous messageGo to next message
Yashveer Rana is currently offline Yashveer RanaFriend
Messages: 15
Registered: November 2012
Junior Member
Well, the things you mentioned would be at the top of my checklist.. Here's a screenshot of the two executed cases :

1. Select Node By TextPath

http://s7.postimage.org/800r50c17/node_select.png


2. Check Node By Textpath

http://s8.postimage.org/8n73liuk5/node_check.png


The funny thing for this test case is - In the AUT, it expands the parent 'Errors' Node, so you would expect it to be going in the right direction

[Updated on: Sun, 20 January 2013 09:30]

Report message to a moderator

Re: Tree node checking inconsistent [message #1003874 is a reply to message #1003115] Tue, 22 January 2013 07:09 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hm, that is indeed rather strange. One other possible avenue to try is whether it has to do with synchronization in any way. You could try, e.g.
- Selecting Errors/Chronological and then checking the existence (thus assuring that the tree is open - if it is dynamically created, then there could be some timing problems happening here)
- What happens if you just try check existence of the Errors entry?

Best regards,
Alex
Re: Tree node checking inconsistent [message #1004394 is a reply to message #1003874] Wed, 23 January 2013 06:11 Go to previous messageGo to next message
Yashveer Rana is currently offline Yashveer RanaFriend
Messages: 15
Registered: November 2012
Junior Member
Tried what you suggested. Here are the results :

http://s2.postimage.org/ya6axzuh5/case_union.png


Something fishy going on here? I tried executing it with the 'simple match' operator too, but to no avail.

[Updated on: Wed, 23 January 2013 06:52]

Report message to a moderator

Re: Tree node checking inconsistent [message #1005146 is a reply to message #1004394] Thu, 24 January 2013 14:54 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

Thanks for the update. Fishy indeed. Can you let me know what version of Eclipse you're using? I'll give it a spin here.

Best regards,
Alex
Re: Tree node checking inconsistent [message #1005364 is a reply to message #1005146] Fri, 25 January 2013 06:06 Go to previous messageGo to next message
Yashveer Rana is currently offline Yashveer RanaFriend
Messages: 15
Registered: November 2012
Junior Member
Eclipse SDK

Version: 3.8.0
Build id: I20120608-1200
Re: Tree node checking inconsistent [message #1005394 is a reply to message #1005364] Fri, 25 January 2013 08:57 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Yashveer, thanks for your help in identifying this. I've tested it and also reproduced the problem. I've put a bug in here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=399042

Best regards,
Alex
Re: Tree node checking inconsistent [message #1006620 is a reply to message #1005394] Fri, 01 February 2013 08:49 Go to previous messageGo to next message
Yashveer Rana is currently offline Yashveer RanaFriend
Messages: 15
Registered: November 2012
Junior Member
Alright, so is there any workaround to checking the existence of a node at this point which i can employ in my test cases?
Re: Tree node checking inconsistent [message #1007265 is a reply to message #1001179] Tue, 05 February 2013 09:58 Go to previous messageGo to next message
Andre Renard is currently offline Andre RenardFriend
Messages: 39
Registered: February 2013
Location: Liege, Belgium
Member
I am also facing the same problem. I use the simple match only.
I was trying to match 'Navigation/Executions' in a tree (TEXTPATH in ub_tre_selectNode_byTextpath Test Case)
Worked with: N*/Executions but not with */Executions or N*/Execution*
I am using Jubula 1.3.0.201210161256 on Windows7 with Eclipse RCP 3.7.2 for the AUT.
Pretty ennoying because unreliable.
Re: Tree node checking inconsistent [message #1007485 is a reply to message #1007265] Wed, 06 February 2013 07:11 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Andre,

Your problem sounds like it is a different one - the problem that Yashveer found is specifically in trees with columns, and only for checking. If you put more details in about your problem, then someone might be able to help.

For Yashveer -

I'm afraid the only workaround I can think of would be to try to select the node - you could build a module that:

- Selects the node (if it is there, the test will be successful)
--- The module should contain an empty Test Case as an Event Handler set to action error that continues if an action error occurs.

That would mean that if the node is not there (usually a check failed), then you would get an action error, but the test would continue (i.e. as if a check failed had occurred).

Another more complex route would be to build a module that:
- Selects via textpath the parent of the node you want to check
- Then selects via indexpath (with SEARCH_TYPE relative) the node whose existence you want to check (this presupposes that at least one node is a child of the previously selected node)
- Then performs check text of selected node

Hope that helps,
Alex
Re: Tree node checking inconsistent [message #1007499 is a reply to message #1007485] Wed, 06 February 2013 08:38 Go to previous messageGo to next message
Andre Renard is currently offline Andre RenardFriend
Messages: 39
Registered: February 2013
Location: Liege, Belgium
Member
Hi Alex,

I am not sure my problem is so different.

I was trying to (simple) match the node path 'Navigation/Executions' in a tree as you can see in

index.php/fa/13307/0/

If I use */Executions* as in

index.php/fa/13308/0/

it does not work

index.php/fa/13309/0/

index.php/fa/13310/0/

But with N*/Executions it does

index.php/fa/13311/0/

What's wrong with my test case?
Andre
  • Attachment: Image 1.png
    (Size: 39.50KB, Downloaded 1005 times)
  • Attachment: Image 2.png
    (Size: 81.70KB, Downloaded 1057 times)
  • Attachment: Image 3.png
    (Size: 33.88KB, Downloaded 1047 times)
  • Attachment: Image 4.png
    (Size: 36.27KB, Downloaded 1022 times)
  • Attachment: Image 5.png
    (Size: 37.79KB, Downloaded 1060 times)

[Updated on: Thu, 07 February 2013 07:26]

Report message to a moderator

Re: Tree node checking inconsistent [message #1007511 is a reply to message #1007499] Wed, 06 February 2013 09:17 Go to previous messageGo to next message
Andre Renard is currently offline Andre RenardFriend
Messages: 39
Registered: February 2013
Location: Liege, Belgium
Member
Also I don't understand what I am doing wrong here. Error message says that the variable should be saved. How do I do that? Do I forget something?

index.php/fa/13312/0/

index.php/fa/13313/0/
  • Attachment: Image 9.png
    (Size: 48.00KB, Downloaded 1022 times)
  • Attachment: Image 10.png
    (Size: 43.30KB, Downloaded 992 times)
Re: Tree node checking inconsistent [message #1007529 is a reply to message #1007511] Wed, 06 February 2013 10:40 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
= is for parameters, ${} for variables so =node should work here
Re: Tree node checking inconsistent [message #1007540 is a reply to message #1007529] Wed, 06 February 2013 11:10 Go to previous messageGo to next message
Andre Renard is currently offline Andre RenardFriend
Messages: 39
Registered: February 2013
Location: Liege, Belgium
Member
Indeed it does. Thanks.
Re: Tree node checking inconsistent [message #1007544 is a reply to message #1007511] Wed, 06 February 2013 11:33 Go to previous messageGo to next message
Andre Renard is currently offline Andre RenardFriend
Messages: 39
Registered: February 2013
Location: Liege, Belgium
Member
I got the same results using matches.
N.*/Executions* works but not .*/Executions
Re: Tree node checking inconsistent [message #1007701 is a reply to message #1007544] Thu, 07 February 2013 08:10 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Andre,

Ah, now I understand. Paths are analysed stepwise - that means that if you enter * for the first level, then the first item that matches this will be taken (in this case, General). Executions is then not found, and you get the error. N* works because the first thing that matches this path part is the "Navigation" item.

Best regards,
Alex
Re: Tree node checking inconsistent [message #1007935 is a reply to message #1007701] Fri, 08 February 2013 10:07 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
wow that is really nasty. Isn't that a bug ?
This is really misleading..
Re: Tree node checking inconsistent [message #1007939 is a reply to message #1007935] Fri, 08 February 2013 10:46 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Sylvain,

It can certainly be discussed whether it is the best way of doing things, but at least at the moment it works as designed. You can open an enhancement to discuss the behaviour if you'd like.

Best regards,
Alex
Previous Topic:Unsupported / Addn. Keyboard Layout
Next Topic:Important information for migration to the next release
Goto Forum:
  


Current Time: Thu Apr 25 07:37:09 GMT 2024

Powered by FUDForum. Page generated in 0.05064 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top