Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Active Contributor

Sample application

Sample jMeter test

You Java application is deployed, your jMeter tests are running without errors, but still: do you know if your application is actually executed the right way? First, remember that this kind of testing is not primarily about functional testing (use Selenium for that). It’s load testing with automated web application testing to know if the underlying code works. Does it do what you expect? You can check the responses logged by jMeter to see if the returned HTML is correct, but that is simply too much work. You won’t actually use this setup to know if value X is in the result table presented to user C. It’s more about: if I click button A, does my business logic gets triggered and goes to table X and extract a list of values?

To find this out, I use logs. Therefore, to know if a popup is called and closed with success by jMeter I add a logger call to the close function. This code looks like:

SimpleLogger.log(Severity.ERROR, cat, logger, "Message ID 001", "just a test {0}", "popup");

When the popup is closed, the application writes a message into the log. Normally you’d write a more intelligent log message, maybe including start and end time of a function. But the log message serves the needs to see if jMeter opened and closed the popup. After a single test run verified everything is working, jMeter can show what it is capable of:

The next steps here are of course using several different users and include logon and logoff into the test run, besides calling the WDJ application from inside the SAP Portal.

This also shows that jMeter can be used to automate repetitive developer tasks. Instead of deploying a change, open the browser, inserting for the Xth time the same data and clicking submit, only to finally check the log if the returned object matches, you can focus on the actual log. Another nice side effect is – apart of saving time – that automatically you`ll have a test case in jMeter written. In case your change brakes the UI code, you`ll notice this pretty soon.

Labels in this area