class TableForMultiplication
{
public static void main(String args[])
{
int i, j;
System.out.println(“Enter an integer to display it’s multiplication table…”);
Scanner in = new Scanner(System.in);
i = in.nextInt();
System.out.println(“Multiplication table of “+i+” is :-“);
HP LoadRunner – how to use Virtual user generator.
1) Under Windows menu >> HP Software >> Click on Virtual user generator menu to open HP Virtual user generator application (if you already have HP LoadRunner is installed on machine)
2) Select the protocol – refer Snapshot 1 below,
Note 1: if you are not sure about the protocol, use the protocol adviser in the “Virtual user generator” application and scan the application to find out best matching protocols (refer Snapshot 2 below)
Note 2: for web applications usually “Web – HTTP/HTML” is the protocol, you add additional protocols for database e.g ODBC or Oracle.
Snapshot 1
Snapshot 2
3)
Click on create button in the above snapshot
2. Enter url as copied below in snapshot
3. Then Click start recording
Snapshot 3
4) Once your application pop us – start doing the business transactions which you wanted to do. You will see recording status is updated as below (adding time – below snapshot 4 shows 2.58 min recording )
Snapshot 4
5) Once the code is developed – HP LoadRunner Controller is used to setup the scenario – refer the Performance best practices to get the flow.
Recording Jmeter scripts using Jmeter’s HTTP(S) Test Script recorder. There are two ways
1) Manually adding scripts ( Test plan >> Tread Group >> Add>> Sampler >> HTTP Request )
2) Recording using Jmeter’s HTTP(S) Test Script recorder
How to record Jmeter scripts using HTTP(S) Test Script recorder?
Prior doing that we need to configure browser and learn about the Proxy setup
Jmeter to Application server communication need to be routed through a browser Proxy for this recording purpose. For that you may need to select the Browser (here we can use Firefox browser”
3) Once this configuration is made – create Recording controller
Path ==> Test plan >> Tread Group >> Add>> Logic Controller >> Recording controller
Recording controller will look like as below:
4) Now add the HTTP(S) Test Script recorder
HTTP(S) Test Script recorder will look like as below:
Also make sure the URL patterns to be included. I need only .html so added as below,
5) Now click on Start button and type on the Firefox browser with input url name and subsequent actions that you want to consider for performance test recording.
Apache JMeter is a Java based performance testing tool works well on web communication layer (HTTP).
How to create Jmeter scripts?
There are two ways
1) Manually adding scripts ( Test plan >> Tread Group >> Add>> Sampler >> HTTP Request )
2) Recording using Jmeter’s HTTP(S) Test Script recorder
How to manually add Jmeter scripts
1 Follow the path : Test plan >> Tread Group >> Add>> Sampler >> HTTP Request as copied in the below screenshot
Below the fields needs to be filled when you write a code,
1) Name: you can give any logical name based on application (e.g Login, Home page etc)
2) Server Name or IP : it’s nothing but the IP of your server or the url name (www.your test site.com or “your test site.com” as example or if you know the IP, provide the IP)
3) Path : is “/sso/auth” in this example screenshot below as the remaining contents in the url after “.com” – if your original site is www.your test site.com/sso/auth
4) Make sure the Method è POST and protocol can be HTTP or HTTPS – which ever protocol is used.