QTP program to display odd and even numbers

QTP program to display odd and even numbers

‘ program to display odd numbers 

Dim OddNum,  o

o = Inputbox(“enter any value to check list of odd numbers in it”)

For OddNum = 1 To o Step 2

print OddNum

Next

‘ program to display even numbers 

Dim  EvenNum,  e

e = Inputbox(“enter any value to check list of even numbers in it”)

For EvenNum = 2 To e Step 2

print EvenNum

Next

How to do string reverse in qtp

How to do string reverse in qtp

How to do string reverse in qtp

Dim String1, String2, StringLength, i

String1 = “Happy Valentine’s Day”
StringLength = len(String1)

For i = StringLength To 1 step -1

String2 = String2 & mid(String1, i, 1)

Next

Msgbox String2

String reverse in qtp

Dim String1, String2, StringLength, i

String1 = “Shalima Prakash”
StringLength = len(String1)

For i = StringLength To 1 step -1

String2 = String2 & mid(String1, i, 1)

Next

Msgbox String2

Highest number in array

How to find the Highest number in array

Highest number in array

Dim Num, i, ArrayLength

Num = Array(1,3,4,2)

ArrayLength = Ubound(Num)

For i = 1 To ArrayLength

If (Num(i) > Num(0)) Then

Num(0) = Num(i)

End If

Next

Msgbox Num(0)

Jmeter tutorial on Jmeter components, terminologies etc

Jmeter tutorial on Jmeter components, terminologies etc…

1.       Thread group – refers the virtual users count applied while performance testing using Jmeter.

How we design the user transactions or thread group?

1)      The requirement is given that 60 user transactions needs to be made. And requested for 3 sec interval between transactions

2)      Then Ram up time should be set 180 sec.  This will fulfill the requirement of 3 sec delay between transactions

3)      This will also ensure that the 60th thread or user will be starting the action at 180th sec.  ( i.e Ramp up time / number of users – will give you the time interval for each uses to kick off. Total ramp up time will be the total time to start all transactions including the 60th one. Based on the transaction scenario length probably first set of 1 to 50th ones may be finished by this time) – similar articles on Jmeter , script Recording

2.       Samplers

Samplers are transaction makers which will let you send transactions.

For e.g HTTP Request sampler is used, it will send HTTP/HTTPS request to the web server. This requests can be manually added or recorded using HTTP(S) Test Script Recorder.

Web embedded resources like CSS, images, java applets, scripts, background images are retrieved by HTTP requests.

similar article on Jmeter

3.  Test plan

Test plan is the container of all the performance test scenarios and components of the particular test in Jmeter. Test plan consists of Thread group , temporary work bench, Samplers, etc.

3 things about Kansai international airport in Japan

3 things about Kansai international airport in Japan

1) Kansai international airport is in Japan which is surrounded by water

2) 4 Kilometers long and 1 Kilometers wide man made island is then developed as an airport. This is one of the biggest airport in the world.

3) The airport build in the year 1994 in Osaka Japan was also referred as world’s most dangerous airport.

Quickest way to remove the google site verification meta tag from HTML code on WordPress site

Quickest way to remove the google site verification meta tag from HTML code on WordPress site.

If your Google search console does not allow you to remove (or unverify) the owner or additional owners as Meta tag exists in the HTML code. Here is the quick solution !

– In WordPress, disable all the Plugins

– go to Google search console

– select the owner or owners you want to remove

– Click unverify – owner will be removed from console

Note: After removal, you can revert plugin status as per your need.

What is TestRunner in Cucumber

What is TestRunner in Cucumber

TestRunner is a program used in Cucumber to access Feature file as copied in the picture below.

Feature file is something that has user requirement scenarios  written in English which gives more readability and understandability of the requirement which is called Gherkin language.

So any roles in the company  like Tester, developer, end user, and techno functional person can read it and understand it. Also this will reduce the complication in terms of missing requirement or misrepresenting or misunderstanding requirements between different roles  like Developer , tester, and  end user,

In order to link Cucumber with Selenium WebDriver, you need to start a Java project in eclipse IDE. Then, add both Cucumber and Selenium jar files

Write test runner code and execute the same . Please refer BDD testing details on Selenium Cucumber

Sample Test runner code:

testrunner
Testrunner

Selenium short video training

Selenium # 26 Selenium Implicit and Explicit wait

Selenium#25 Selenium Keyboard and Mouse events| keyDown(); keyUp(); sendKeys();doubleClick();

Selenium # 24 Coding example | WebElement | locator type xpath, id | driver. findElement short video

Protractor vs Selenium
Robot framework and Selenium2Library

Automaton testing using Cucumber – Behavior driven development (BDD)

Automation testing using Cucumber – Behavior driven development (BDD)

Application behavior is the main focus on BDD. The requirements are written in English which gives more readability and understandability of the requirement.

So any roles in the company like Tester, developer, end user, and techno functional person can read it and understand it. Also this will reduce the complication in terms of missing requirement or misrepresenting or misunderstanding requirements between different roles like Developer , tester ,  end user etc.

Gherkin is a business readable language, refer below for an example. Below feature file is integrated with Selenium and are having user stories as below.

Please refer below – “feature, Scenario, Given, When, And, Then “are the Keywords below to understand on how to write a feature file…

What is Feature file in Cucumber test and how to create a feature file.

Feature file is a part of Cucumber framework and it contains descriptions in English language.

Follow below path to create a feature file

create feature file

One sample transaction as below:

sample feature fileOne sample transaction example as below:

sample feature file transaction
sample feature file transaction

sample feature file

How to use Virtual user generator in HP LoadRunner

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)

Virtual user generator
Virtual user generator

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

Virtual user generator protocol
Virtual user generator protocol

Snapshot 2

3)

Virtual user generator protocol
Virtual user generator protocol

Click on create button in the above snapshot

2.  Enter url as copied below in snapshot

3. Then Click start recording

Snapshot 3

record settings
record settings

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

recording
recording

5)      Once the code is developed – HP LoadRunner Controller is used to setup the scenario – refer the Performance best practices to get the flow.

19 regular expression methods in UFT/QTP

19 regular expression methods in UFT/QTP

1.       Period (.) is used to represent or replace any symbol except new line

2.       Asterisk (*) represents zero or more occurrences

3.       Caret (^) sign instructs beginning of the line

4.       Dollar ($) sign instructs end of line

5.       \b instructs Word boundary

6.       ? instructs zero or more occurrences

7.       + instructs one or more occurrences

8.       {} represents exact number of occurrences

9.       []  represents any character in the set

10.   [^]  represents any character NOT in the set

11.   () represents Group

12.   I represents Or

13.   \n represents new line

14.   \W represents any non-Word character

15.   \d is any digit

16.   \D is any non-digit

17.   \s is any white space character

18.   \S is any non- white space character

19.   \ is escape special character