Logo QF-Test

Finding valuable answers
in the Mailing List Archive.

 

Free Trial  Download  Buy

Thomas Max, QF-Test training and support

Use the full-text search on our web site to find helpful tips on the mailing list.

Thomas Max, 
Sr. Software Engineer & Trainer, QFS

2016 up to now | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries of 2007


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QF-Test] Strange problem with global variable bindings


  • Subject: Re: [QF-Test] Strange problem with global variable bindings
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: 10 May 2007 22:22:57 +0200

Hi Adrian,

can you send me the test-sutei as well, please?

I'm not in a state of mind right now to puzzle this out from the
run-log alone, I need to run this in the debugger and check the
variable stacks.

Thanks and best regards,
    Greg


"Adrian Chamberlain \(BE/ETL\)" <adrian.chamberlain@?.com> writes:

> I am experiencing a strange problem in QF-Test 2.0.2-p2 with reference
> to global variable bindings.  I can't quite see what I am doing wrong to
> cause this problem.  Any help/advice offered would be much appreciated.
>
> Basically I have a small package (stack) of procedures which allows the
> test engineer to create a simple stack.
>
> e.g.
> procedure stack.create(name, maxSize)
> procedure stack.push(name, item)
> procedure stack.pop(name, item)
> procedure stack.destroy(name)
> etc.
> etc.
>
> This is where things get strange!
>
> If I play the following 'call procedure' nodes one by one then all is fine.
> (i.e. select procedure call node, click on play button, then proceed to
> next line and click on play button etc. etc.)
> call procedure stack.create(test, 5)
> call procedure stack.push(test, item 1)
> call procedure stack.push(test, item 2)
> call procedure stack.push(test, item 3)
> call procedure stack.push(test, item 4)
> call procedure stack.push(test, item 5)
>
> At the end of this the global QF-Test variables are as follows:
> ( Edit->Options->Variables->Globals )
> stack_test_item_0      item1
> stack_test_item_1      item2
> stack_test_item_2      item3
> stack_test_item_3      item4
> stack_test_item_4      item5
> stack_test_maxSize   5
> stack_test_ptr            5
>
> This is correct.
>
>
> However, if I select all of the aformentioned 'call procedure' nodes and play them in one
> go (i.e. play a group selection of nodes), the following happens:
>
>
> Firstly the global variables look as follows.
>
> Edit->Options->Variables->Globals
> stack_test_item_0      item5
> stack_test_maxSize   5
> stack_test_ptr            1
>
> Secondly both the variable bindings and the run log (attached) show that something
> went wrong with respect to the variable binding for 'stack_test_ptr' (stack_$(name)_ptr).
>
> With reference to the run log if you look at the entry for
> 'call procedure stack.push(test, item 2)
> the rc.lookup("stack_$(name)_ptr") is not retrieving the correct value for this
> variable binding i.e. value of '0' instead of a value of '1' ?
>
> Notice that this variable was correctly set to a value of '1' in
> 'call procedure stack.push(test, item 1)
>
> Basically I am confused at this point as to what is going on.  Particularly as to
> why everything works fine if the procedure call nodes are played one by one, as
> apposed to a group selection.
>
> Thank you in advance for any help/advice offered.
> Regards
> Adrian

--
Gregor Schmid                                Gregor.Schmid@?.de
Quality First Software GmbH                     http://www.qfs.de
Tulpenstr. 41                                Tel: +49 8171 919870
DE-82538 Geretsried                          Fax: +49 8171 919876
GF: Gregor Schmid, Karlheinz Kellerer          HRB München 140833



Videos Downloads Documentation Buy Free Trial