With the Modeler that ships with OpenSTA 1.4.3.20, if you pass an empty
string, i.e. "" as a parameter to a subroutine, all following parameters
are ignored.
There is an example script below.
The first time CHECKRESPONSE is called with all 3 parameters populated, it
works fine.
The second time CHECKRESPONSE is called with the first parameter set to "",
it ignores all the parameters and uses the parameters passed the first
time.
Problem has been confirmed by Bernie Velivis:
"I tried a simple subroutine with 4 string args. As soon as one (counting
from left to right) is set to "", then all remaining arguments are set to
"" or 0 if numeric. Looks like the code that parses arguments passed to
subroutines quits when it see's a null. I would definitely report it on
sourceforge."
============ EXAMPLE SCRIPT ==================
!Browser:IE5
!Date : 14/08/2007
Environment
Description ""
Mode HTTP
Wait UNIT MILLISECONDS
Definitions
! Standard Defines
Include "RESPONSE_CODES.INC"
Include "GLOBAL_VARIABLES.INC"
CHARACTER*512 USER_AGENT
Integer USE_PAGE_TIMERS
CHARACTER*256 MESSAGE
CHARACTER*256 p1
CHARACTER*256 p2
CHARACTER*256 p3
Timer T_QQQQ
CONSTANT DEFAULT_HEADERS = ""
Code
!Read in the default browser user agent field
Entry[USER_AGENT,USE_PAGE_TIMERS]
Start Timer T_QQQQ
CALL CHECKRESPONSE["1param1","1param2","1param3"]
CALL CHECKRESPONSE["","2param2","2param3"]
SYNCHRONIZE REQUESTS
End Timer T_QQQQ
SUBROUTINE CHECKRESPONSE[p1,p2,p3]
Log "Parameter 1:", p1
Log "Parameter 2:", p2
Log "Parameter 3:", p3
END SUBROUTINE
Exit
ERR_LABEL:
If (MESSAGE <> "") Then
Report MESSAGE
Endif
Exit
Nobody/Anonymous
Script Language
Behavioral
Public
|
Date: 2007-10-15 15:46
|
| Field | Old Value | Date | By |
|---|---|---|---|
| resolution_id | None | 2007-10-19 02:10 | dansut |
| summary | Empty SUBROUTINparams cause other params to become empty | 2007-10-19 02:10 | dansut |
| summary | empty parameters cause other parameters to become empty | 2007-10-19 02:08 | dansut |