Re:Weird variable inheritance behavior

View: New views
1 Messages — Rating Filter:   Alert me  

Re:Weird variable inheritance behavior

by unclebob :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Weird variable inheritance behaviorPosted by: "villimucho" villimucho@...
>    villimuchoFri Oct 30, 2009 9:57 am (PDT)
>
>
> When I run a suite, very often a variable that's defined in a parent  
> page has the wrong value. My layout is basically like this:
>
> Suite1 > Test1, Test2, Test3
>
> Suite2 > Test4, Test5, Test6
>
> Suite1 and Suite2 have a variable with the same name defined, and  
> this variable is used by the test cases under those suites.
>
> In some test runs, instead of the value of the variable that's  
> defined in the parent showing up, the value from the other suite  
> shows up, e.g. Test1 has the value defined in Suite2 rather than the  
> one in Suite1.
>
> This only happens to some tests within a suite -- some tests inherit  
> the correct variable, some don't. Additionally, there doesn't seem  
> to be any pattern to this, as sometimes it works correctly and  
> sometimes it doesn't.
>
> Any ideas why this is happening? Are there any workarounds?


This sounds very disturbing.  Can you provide a simple example that  
fails?

----
Robert C. Martin (Uncle Bob)  | email: unclebob@...
Object Mentor Inc.            | blog:  blog.objectmentor.com
The Agile Transition Experts  | web:   www.objectmentor.com
800-338-6716                  | twitter: unclebobmartin