Forum Discussion

mishra232's avatar
mishra232
New Contributor
12 years ago

Maintaining global variable using mock service

Hi,

I am using mock service and running fine. I would like to have some global counter which can tell how many total number of responses sent by the mock service.

For this tried below options but no luck till now :-
1) Created property "count" with value 0 inside Properties tab (left to Start script). and would like to increment it inside OnRequest script and printing it to some file or log itelf.
but not able to access count variable inside Start or OnRequest script.

1 Reply

  • Not quite a counter, but:
    If you open up your mock service, there's a "Message Log" tab that has the logs of the responses that have been sent.

    Thanks,
    Michael Giller
    SmartBear Software