Pages

Friday, 21 July 2017

JMeter - Interview Question #8

Q. 36 What is a Root CA Certificate?
Ans: HTTPS connection requires a certificate to authenticate the connections which get established when the browser hits the web server. JMeter generates it temporarily to intercept the SSL traffic in order to record the actions. For more information click here.

Q. 37 What is Tidy Parsing?
Ans: Tidy Parsing is a type of parsing that is used in Xpath extractor. If the response is in pure XML then tidy parsing is not required whereas, in case of XHTML, it is mandatory to check the tidy parsing option in order to fetch the correct results.

Previous: JMeter Interview Question #7

JMeter - Interview Question #7

Q. 31 What is BeanShell scripting?
Ans: BeanShell scripting is used to write the custom code in the JMeter script. Most of the tasks are covered by available JMeter elements, apart from this if there are any complex scenario then BeanShell scripting is used. It is a lightweight Java scripting to perform some additional task. 

Q. 32 What are the BeanShell elements available in the JMeter?
Ans: Following are the BeanShell elements:
a. BeanShell PreProcessor
b. BeanShell PostProcessor
c. BeanShell Timer
d. BeanShell Assertion
e. BeanShell Listener 
f. BeanShell Sampler 
Q. 33 What is the use of BeanShell sampler?
Ans: BeanShell sampler can perform various functions with the use of coding. You can print the thread number, get the current sampler executed, fetch the cookies etc.

Q. 34 What is JSR223 elements?
Ans: JSR223 elemets are also a scripting-based component. JSR stands for Java Specification Requests. As same as BeanShell,  you need to write custom code logic by yourself using one of the supported scripting languages like Groovy, BeanShell, java, javascript, jexl etc. Usually, it is helpful when you need to write custom code based on some unique algorithm which is not currently provided by JMeter. 

Q. 35 What are the available JSR223 elements?
Ans: Following are the JSR223 elements:
a. JSR223 PreProcessor
b. JSR223 PostProcessor
c. JSR223 Timer
d. JSR223 Assertion
e. JSR223 Listener 
f. JSR223 Sampler 
Next: JMeter Interview Question #8

Previous: JMeter Interview Question #6

JMeter - Interview Question #6

Q. 26 What is the significance of -n, -t, and -l in the JMeter command to run the test in non-GUI mode?
Ans. The command to run JMeter in non-GUI mode is
jmeter -n -t myScript.jmx -l myLog.jtl  
where, 
-n specifies that JMeter will run in the non-GUI mode
-t for test script file
-l for jtl file having each sample's result
Q. 27  How to use a parameter in the JMeter script.
Ans: Let's consider 'host' is a variable having an application URL defined in the User Defined Variable element. The original value of host can be replaced by ${host} wherever required.

If this variable defined in a property file then it is called by ${__P(host)}.

Q. 28 What are the different non-GUI mode to run JMeter test?
Ans: There is various Non-GUI mode supported by JMeter:
a. Command Line
b. ANT Plugin
c. MAVEN Plugin
d. Jenkins
Q. 29 How sessions and cookies are managed in JMeter?
Ans: Sessions and cookies are managed in JMeter by using config elements such as HTTP Cache Manager which provides an option to save the cookie. There is also an option to clear the cookies in every iteration and also allows to add user-defined cookies.

HTTP Cache manager helps to cache the images and .css file. It can also be cleared after each iteration as per the requirement in the load tests and also limits the number of elements which can be stored in the cache. 

Q. 30 How database connection can be set-up in JMeter?
Ans: Database connection can be set-up by JDBC default request (Config Element) or JDBC request (Sampler).

Next: JMeter Interview Question #7

Previous: JMeter Interview Question #5

JMeter - Interview Question #5

Q. 21 How to reduce the memory requirement for execution using JMeter?
Ans: To reduce the memory requirements following steps need to be followed:
a. Use non-GUI mode for test execution using below command:
jmeter –n –t test.jmx –l test.jtl
b. Do not use listeners or disable them before the test started.
c. Don’t use functional mode.
d. Try to implement scripting logic using available element only
e. Try to avoid the code (you can use only in that case when the specific JMeter element is not available) 
f. If you are writing the code logic then use Groovy instead of BeanShell.
g. Use CSV output rather than XML.
h. Save the data which you need.
i. Use as few Assertions as possible. 
Q. 22 How do you record the script using Test Script  Recorder?
Ans: Below is the steps followed to record a script:
a. Add HTTP(s) Test Script Recorder
b. Enter the port number
c. Enter the host URL
d. Add a Recording Controller in the test plan and select the same as Target so that all the recordings are stored under it.
e. Configure the browser with manual proxy settings pointing to the same port number used in the test script recorder
f. Click "Start" button in HTTP(s) Test Script Recorder
Q. 23 What is distributed load testing? 
Ans: The generation of a huge volume of user load does not possible using the same machine. The solution is either to increase the resources of the machine or use a distributed structure. The distributed load testing is the process through which numerous systems can be used for simulating a load of a large number of users and those systems act as load generators. 

Q. 24 How can distributed load testing be achieved?
Ans: By using the master-slave configuration, JMeter can do distribute load testing.

Q. 25 How to do master-slave configuration in JMeter?
Ans: Master-Slave configuration is a part of Distributed Testing in which more than one machine is used to perform load testing of the server under test. It is very important that all machines are on the same network and all have the same version of JMeter. In distributed testing, one machine is made as the Master and the others are kept as slaves by doing below configurations:
a. On master machine, edit the jmeter.properties file and add the IP addresses of slave machines against the remote_host field in the file.
b. Save the file and open the JMeter again.
c. Now from the Run menu in JMeter, select Remote Start and choose the IP of the machine to be invoked.
d. Choose the Run menu and select Remote Start all to start all the slave machines for your testing.
Next: JMeter Interview Question #6

Previous: JMeter Interview Question #4

JMeter - Interview Question #4

Q. 16 What is the use of the configuration elements?
Ans: To set up defaults values and variables for later use, default config element added under the Test Plan. At the start of the scope, these elements are processed before any samplers in the same scope.

Q. 17 What is Test Fragment?
Ans: Test fragment is also a type of element like Thread Group element. The only difference is test fragment is not implemented unless it is referenced by either a Module controller or an Include controller. Get more detail on Test Fragment here.

Q. 18 What do you know about assertions?
Ans: The actual task of assertions is to validate the response. It checks certain values in the response coming from the server.

Q. 19 What is the Timer in JMeter?
Ans. Timers are used for halting the test execution of a thread for a certain predefined time. These timers are used for simulating the real user think time. The different types of timers available in JMeter are:
a. Constant Timer
b. Gaussian Random Timer
c. Uniform Random Timer
d. Constant Throughput Timer
e. Synchronizing Timer
f. Beanshell timer
g. Throughput Shaping Timer
h. JSR223 Timer
i. Poisson Random Timer 
Q. 20 What are the listeners in JMeter?
Ans: Listeners are used for storing the execution results of load testing in different forms like table, graph, tree or in any other presentable format so that it can be presented to the client. 

Next: JMeter Interview Question #5

Previous: JMeter Interview Question #3

JMeter - Interview Question #3

Q. 11 What is the purpose of Sampler?
Ans: Samplers are used to emulate the web page. Each sampler belongs to an individual request which hit to the server during the test execution. These samplers result to find the attributes like elapsed time, data size, etc. of a particular request. Samplers allow JMeter to send specific types of requests to the server, through different types of samplers. Some of the useful samplers are HTTP request, FTP request, JDBC request and so on.

Q. 12 What are the different ways of Data Parametrization in JMeter?
Ans: Data Parametrization makes the scripts reusable where the values need not be hardcoded for the same request with different parameters. Below is the data parametrization that is supported in JMeter:
a. CSV Data Set Config
b. User Defined Variables
c. User Parameter
To know more about differences in all these three parameterization components click here.

Q. 13 What are the types of a processor in JMeter?
Ans: The types of a processor in JMeter are
a. Pre-processor: Execute before the parent element
b. Post processor: Execute after the parent element
Q. 14 What are the maximum recommended threads on a single system?
Ans: It depends on the hardware configuration like the processor, JVM, allocated memory -Xmx, etc. of the machine on which JMeter (or load generator) lie. Other factors which impact the thread count are the number of components in the test plan i.e. the number of config elements or processors and it also depends on whether the test executed in GUI/Non-GUI Mode.

Q. 15 What is the execution order of Test Elements?
Ans: The test plans elements execute in the given order
Test Plan
Configuration elements
Thread Group
Pre-processors
Timers
Samplers
Post-processors
Assertions
Listeners

Next: JMeter Interview Question #4

Previous: JMeter Interview Question #2

JMeter - Interview Question #2

Q. 6 Why Regular expression is used in JMeter?
Ans: Regular Expression is used to find out the dynamic value returned by the server like session ID, order number etc. and then pass that value in the next requests. Based on the pattern, a regular expression is used to search and manipulate text. You can learn regular expression by clicking here.  

Q. 7 If you do not know how to write regular expression then how can you capture the dynamic values in the JMeter script?
Ans: In JMeter 4.0, a new element called "Boundary Extractor" has been introduced where we need to provide left and right text (boundary) of dynamic value. It has the same concept as LoadRunner. 

Q. 8. What is the difference between Boundary Extractor and Regular Expression Extractor?
Ans: Both are used for capturing the dynamic values but regular expression extractor uses regular expression token whereas boundary extractor uses the left and right boundaries. To learn more click here.

Q. 9 What is a thread group in JMeter?
Ans. A Thread Group is an element of the JMeter test plan that represents a pool of virtual users performing a set of operations and helps to create the expected scenario.

Q. 10 What are the different types of Thread Group in JMeter?
Ans: Following are the thread groups. Click on the name to get more information about related thread group:
a. Normal Thread Group
b. Ultimate Thread Group
c. stepUp Thread Group
d. Concurrency Thread Group  
e. tearDown Thread Group
f. Arrivals Thread Group
g. Free-Form Arrivals Thread Group
Next: JMeter Interview Question #3

Previous: JMeter Interview Question #1

JMeter - Interview Question #1

Q. 1 Why does JMeter become a natural choice of the tester when it comes to performance testing?
Ans: JMeter tool has benefits like
  • It can be used for testing both static resources like HTML and JavaScript, as well as dynamic resources like Servlets, Ajax, JSP, etc.
  • JMeter has a tendency to determine the maximum number of concurrent users that your website can handle
  • It provides a variety of graphical analyses of performance reports
  • It is free
  • Plug-ins are available to extend the features
Q. 2 What is the base language of JMeter?
Ans: Java

Q. 3 How can you apply licenses of different protocol in JMeter?
Ans: JMeter is an open source application and does not require any licensing, tool or maintenance cost.

Q. 4 What kind of applications can be tested using JMeter?
Ans. Following are applications that can be tested using JMeter are:
a. Websites
b. Web services both - REST and SOAP
c. Databases(JDBC)
d. Shell scripts
e. FTP
f. LDAP
g. TCP
h. SMTP, POP3, IMAP
Q. 5 What exactly do you know about a Workbench in JMeter?
Ans: Workbench element has been removed from the JMeter 4.0 version onwards, Although it was used to store the element on the temporary basis. In addition to the testing elements, there were certain non-test elements which were also present in it; had been added under the Test Plan. 


Tuesday, 11 July 2017

LoadRunner - Interview Question #12

Q. 56 What is the use lr_abort function?
Ans: The lr_abort function is used to abort the execution of a Vuser script. It instructs the Vuser to stop executing the Actions section, execute the vuser_end section and end the execution.

Q. 57 During the load test, what is the optimum setting for Logs? 
Ans: For the load test log level is set to minimal. This can be achieved by setting the log level to the standard log and selecting the radio button “Send a message only when an error occurs”.

Q. 58 What is the Threshold level for think time and how can be this changed?
Ans: If the recorded think time is less than the threshold, VuGen does not generate a think time statement during recording. You also specify the threshold value using: 
Recording options -> Script -> Generate think time greater than the threshold
The default value is 3. If the think time is less than 3 seconds, VuGen does not generate think time statements. If you disable this option, VuGen will not generate any think times.

Q. 59 How to enable Automated Correlation?
Ans: Automated Correlation is enabled by:
Recording Options -> Correlation -> Scan for correlations applying -> Rules Scan -> Automatically correlate values found


Q. 60 How to add/import new correlation rule?
Ans: New rules can be added or imported by
Recording Options -> Correlation -> Rules 

Next: LoadRunner Interview Question #12

Previous: LoadRunner Interview Question #11

LoadRunner - Interview Question #11

Q. 51 What are the four selection methods when choosing data from a data file?
Ans: Following are the four selection methods:
a. Sequential
b. Random
c. Unique
d. Parameter name
Learn more about all the parameter selection methods here 

Q. 52 How can you verify the substituted value of the parameter? 
Ans: The substituted value can be confirmed by enabling the Extended Log option in the Runtime Setting (Logs tab) and checked the option "Parameter substitution".

Q. 53 How many graphs you can monitor using Controller or Performance Center Test execution window at a time? What is the maximum number of them?
Ans: One, two, four and eight graphs can be seen at a time. The maximum number of graphs can be monitored at a time is 8.

Q. 54 An application under test having a functionality to accept and reject the requested order. The order summary page shows the customer name and order status. Corresponding to name of each customer it is mentioned whether his order gets "Accepted" or "Rejected". How will you identify the number of Accepted and Rejected orders through VuGen script?
Ans: For this scenario, two text checks are used on that web page with the text “Accepted" and “Rejected”. Through the function web_reg_find, we can capture the number of texts found on the web page and count with the help of “SaveCount”. SaveCount stored the number of matches found.

Q. 55 Can you write the function for the above scenario?
Ans: Given statements should be written above the summary page code:
web_reg_find("Text=Accepted", "SaveCount=acceptOrder", LAST);
 web_reg_find("Text=Rejected", "SaveCount=rejectOrder", LAST);

Next: LoadRunner Interview Question #12

Previous: LoadRunner Interview Question #10

LoadRunner - Interview Question #10

Q. 45 What is Pacing?
Ans: Pacing is the wait time between two iterations.

Q. 46 What is Think time?
Ans: Think time is a wait time between two transactions.

Q. 47 Why Pacing and Think time are two different things?
Ans: Pacing is used to control the load on the server whereas think time is used to achieve the concurrency of the users on the server. To get a detailed information about the think time and pacing, click here.

Q. 48 Which function is used to defined think time?
Ans: lr_think_time(n) where n is an integer value which represents the delay in seconds.

Q.49 Which function is used for Pacing?
Ans: There is no function for Pacing. Instead of that pacing is defined in the Runtime setting.

Q. 50 Can Pacing and Think time be random?
Ans: Yes, with the help of runtime setting we can defined random pacing and think time. 

Next: LoadRunner Interview Question #11

Previous: LoadRunner Interview Question #9

LoadRunner - Interview Question #9

Q. 41 How can we debug a LoadRunner script?
Ans: VuGen contains two options to debug Vuser scripts.
a. Run Step by Step command
b. Breakpoints
You can also use any of the function lr_set_debug_message(), lr_debug_message(), lr_output_message(), lr_error_message().

Q. 42 What is the advantage of running the Vuser as the thread?
Ans: Running Vusers as thread helps to support more virtual users count from any load generator machine due to its small memory print feature for the Vusers.

Q. 43 How do you load a load runner Agent?
Ans: While running the scenario, LoadRunner controller instructs the remote agent dispatcher to launch LoadRunner agent. The controller instructs the LoadRunner agent to initialize, run, pause and stop the Vusers.

Q. 44 What is wasted time in VuGen Replay log?
Ans: Waste time is the spent by LoadRunner to writing the logs, keeping the record, running the logic etc. It is never performed by any browser user and just the time spent on the LoadRunner internal activities.

Q. 45 How do you enable text and image checks in VuGen?
Ans: This can be done by using functions web_reg_find (for text check) and web_image_check (for image check) and enabling image and text check from runtime setting.

Run Time Setting -> Preference ->Enable the Image and text check box

Next: LoadRunner Interview Question #10

Previous: LoadRunner Interview Question #8

LoadRunner - Interview Question #8

Q. 36 Where should you add a web_reg_save_param function to a script?
Ans: This is a correlation function and it is always written before the step that retrieves the dynamic value.

Q. 37 What is Ramp up and Ramp Down?
Ans: The user ramp up decides the rate at which virtual users add to the load test whereas ramp down instructs to LoadRunner at which rate virtual users exit from the load test. 
Example: 
Ramp-up rate - 5 Vusers per 10 seconds
Ramp-down rate - 20 Vusers per 5 seconds
Q. 38 Why user ramp-up is recommended in the performance testing?
Ans: It gives time to warm-up the server. Since the server is rebooted before performance test and its cache is empty which is not the case in the real-time scenario. Hence server warm-up period helps the server to bring in live-like condition. It is a common observation that during the ramp-up period, the response time is slightly high.

Q. 39 You want to have each step in your script measured as a transaction in the report. How can you accomplish this?
Ans: This can be done by Runtime setting. For this purpose you need to navigate:

Runtime Settings -> Miscellaneous -> Automatic Transactions -> Define each step as a transaction (Checkmark this option)

Q. 40 You want to have each action in your script measured as a transaction in the report. How can you accomplish this?
Ans: This can be done by Runtime setting. For this purpose you need to navigate:

Runtime Settings -> Miscellaneous -> Automatic Transactions -> Define each action as a transaction (Checkmark this option)

Next: LoadRunner Interview Question #9

Previous: LoadRunner Interview Question #7

LoadRunner - Interview Question #7

Q. 31 Which function is used to end a nested transaction?
Ans: lr_end_sub_transaction

Q. 32 What are the different types of goals in Goal-Oriented Scenario?
Ans: LoadRunner has five different types of goals in Goal-Oriented Scenario. These are:
a. Virtual Users
b. Hits per second
c. Transactions per second
d. Pages per minute
e. Transaction response time
Click here, to get more details on Goal-Oriented Scenario of LoadRunner.

Q. 33 How is each page validated in the script?
Ans: Each page of an application in the script is validated through the content of the response of the particular page. A content check verifies whether specific content is present on the web page or not. The content check keyword should be unique so that validation becomes more accurate.

Q. 34 What is the difference between Overlay graph and Correlate graph?
a. Overlay Graph: It will overlay the content of two graphs that share a common x-axis 
b. Correlate Graph: It will Plot the Y-axis of two graphs against each other.
The detailed information has been given at this Link.

Q. 35 What are the step to modify the script in VuGen after recording?
Ans: Once the script is recorded, it can be modified with the following process:
a. Add Transaction
b. Parameterization
c. Correlation
d. Variable declarations
e. Rendezvous Point
f. Validations/Checkpoint
Click the name of the step to get detailed information.

Next: LoadRunner Interview Question #8

Previous: LoadRunner Interview Question #6

LoadRunner - Interview Question #6

Q. 26 When you disable logging?
Ans: Logging is used during debugging and disabled while execution. The recommended log option during test execution is "Send messages only when an error occurs".

Q. 27 What are the types of content check available in LoadRunner?
Ans: LoadRunner provides two types of check:
a. Image Checkpoints: This checkpoint will verify the presence of an image on a page during run-time
b. Text Checkpoint: This checkpoint will verify the presence of a text-string on a page during run-time
To get more details on the content check, click here.

Q. 28 What are all the functions of content check?
Ans: Following functions are used for the content check. Click the name of the function to get full details:
a. web_reg_find()
b. web_global_verification()
c. web_image_check()
Q. 29  Which is a deprecated function of content-check?
Ans: web_find()

Q. 30 Why content check is used in the scripting?
Ans: Content check is used to validate the content present in the response of the page. It is recommended to use at least 1 content check on each page. Sometimes content-check is helpful to verify the completion of the flow like order completion by verifying "Thank You" message, homepage by verifying "Welcome" word in the response etc.

Next: LoadRunner Interview Question #7

Previous: LoadRunner Interview Question #5