Logo QF-Test

Im Archiv der Mailingliste
wertvolle Antworten finden.

 

Gratis Testen  Download  Kaufen

Thomas Max, QF-Test Training und Support

Tipp für die Recherche in der Mailingliste: Volltextsuche (oben) verwenden.

Thomas Max,
Sr. Software Engineer & Trainer, QFS

2016 bis heute 2015 | 2014 | 2013 | 2012 | 2011 2010 2009 | 2008 | 2007

(ältere Archiveinträge vor 2007 nicht dargestellt, aber in der Suche enthalten)

Mailingliste - Einträge 2007


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

[QF-Test] Strange problem with global variable bindings


  • Subject: [QF-Test] Strange problem with global variable bindings
  • From: "Adrian Chamberlain \(BE/ETL\)" <adrian.chamberlain@?.com>
  • Date: Thu, 10 May 2007 16:04:50 +0200

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

Attachment: stacks.qrz
Description: stacks.qrz


Videos Downloads Dokumentation Kaufen Gratis Testen