Depending on how you setup Service Tests you are potentially going to have lots of project files to manage and maintain. Unfortunately the default run-time settings for these projects are not ideal for service test development.
I’m going to tell you what settings I find best for service testing and why. I’ll also mention when I deviate from these settings.
To get to your run-time settings press F4. The first collections we will look at are the log settings.
Log Settings
By default Service Test is set to log “standard” information all the time. While the content is ok, I find that this much logging just generates noise. Logging should always be enough to help you diagnose the problem and no more. Anymore just gets in the way.
I have found that setting Service Test to only “Send messages only when an error occurs” is by far a better option. You only want messages reported when there is an error. I care zero for messages that come out of passing tests. But if the wheel squeaks I want to hear about it.
The default log cache for just in time logging is only 1KB. This will need to change if we have any serious errors. So click on advanced and the cache to something more realistic like 64KB.
If you have a large number of tests 80-100 in your project and those tests are complicated then leaving the default setting on can generate significantly large log files. I’ve had them in to the tens of thousands of lines. This helps no one and causes you drama when you try to use the project. Service Test saves all files whenever you press save; even if they haven’t changed. This includes saving your logging files. Depending on the size of your log files you can be waiting 10-15 minutes just for the project to save.
The just in time logging setup also comes in handy if you use Quality Centre and the test lab. Each execution will stores its log files and if they are filled up with meaningless logging information for passing tests that will never get read then you are just wasting storage space.
All this aside when you have an error you may need more information as the just in time logging will give you a report of where the error was thrown and the preceding lines but it won’t give you all the gory details. As soon as you have a failing test you can’t determine the problem of you want to switch to extended logging.

Think Time
By default think time is disabled in Service Test. While this may have been relevant for Load Runner it isn’t for service testing. Think time basically sleeps for a period of seconds. It caught me out once before; I was trying to insert a one second delay between each service request so that created records had different timestamps. Every time I pressed run it just raced ahead ignoring my think time statements.
The moral is; turn think time on whenever you create a new project and do it for all projects created by everyone in the team so that when you use the think time function it gets used.
Miscellaneous Settings
The miscellaneous settings section also contains some settings that against better judgement are disabled. The most important one is “Continue on error”. When you have each action as a test you don’t want 70 tests to not be run just because 1 test failed or failing that just because some xpath was found. Service Test will deem just about any statement as a pass-fail/life or death situation for no useful reason so this setting is so important it should be checked and then removed from the dialogue so that no one can change it again.
The “fail open transactions on lr_error_message” is useful if you use transactions. If you don’t then I wouldn’t worry about it. The custom error message function you will find useful when you start writing shared routines to make your service testing life easier.
Consistent settings
The trick with these settings is that once you get used to using them you will expect them to be on for all projects. So the first step is to educate your team on what settings to use and get everyone using them.
If you have QC you can try creating a template project to copy-paste each and every time you create a new project. I tried this but I find it too slow going in comparison to the bright shiny new test button in QC.
All the other settings in that tab I very rarely change and can be left as default. The logging, think time and miscellaneous settings should be set every time you create a new project. Give it a try.
|
|
Ryan Boucher is a Software Inquisitor and is passionate about it. You can find a whole raft of articles and anecdotes about software testing and other topics he gets excited about. |
| Tags |



