Wednesday, July 13, 2022

Karate Usage Guidelines

Karate Framework Usage Guidelines are as follows-

Project Structure

Each project is structured as follows:

- src (contains global config & js utils)

  - /main

    - /java/com/ddaqe (contains utility functions)

    - /resources (contains supporting jars and files)

  - /test

    - /java

      - /oneService (contain test runners and feature files)

        - /data (contains test data files for oneService)

      - /anotherService (contains test runners and feature files)

        - /data (contains test data files for anotherService)

Creating new tests

Project structure must be maintained.

Environment, accounts and database info are parameterized and defined in karate-config.js file.

    Each feature file:

        must be independent and atomic

        must contain:

    • Feature
    • Background (anything defined here applies to all scenarios in the feature file)
    • Scenarios and/or Scenario Outlines

    should retain consistent formatting to maintain readability: right-click a feature file > Pretty Format (or Ctrl+Shift+F)

Each scenario in a feature file must:

    • be independent of other scenarios and able to run in any order
    • be data-driven when appropriate (refer to https://github.com/intuit/karate#data-driven-tests)
    • have all data files go in '[package_name]/data' folder
    • be tagged with @smoke if it is a smoke test

When a script creates new content in the application under test, prefix the content with "qeauto-" when possible so that it can be identified for deletion later.

Example Karate scripts: https://github.com/intuit/karate/tree/master/karate-demo

Naming Folders & Files

(Refer to attached screenshot for examples) 

  • Name folders and files using lower Camel Case (Camel case starting with lowercase).
  • Name data files in lowercase with hyphen.
  • Services should be named based on Swagger doc information, so that names match. Example: for user details service, package name would be "userDetailsService".
  • Service folder must contain Regression, Smoke and Service runners. Simply replicate from existing copy.
  • Sub-folders are added under the service package for each endpoint path. Example: for /terms path, you create "userDetailsService\terms".
  • Feature files are added in the endpoint folder and names after the endpoint. Where multiple feature files are needed for one endpoint, append an underscore before extending the name. Example: "terms_IncorrectHeaders"



Naming Tests

The way test scripts are named is critical. These are used to report the test run status via scripts back to Adaptavist. The naming convention below must be followed to avoid incorrect reporting.

  • Each scenario description must be prefixed with the test case id, followed by a colon (with no spaces before the colon). Example for Adaptavist test case id IRIS-T223:

Feature: To Test Valuation API

  I want to verify the /lookup/valuation endpoint returns all valuation records.

  Background:

    * url baseUrl

    * header Authorization = auth

    * path '/lookup/valuation'

  Scenario: IRIS-T223: GET /lookup/valuation - All valuation records

    Given request ''

    When method get

    Then status 200

  • Some test cases belong to same functional areas or screens can be merged in a single automation script. In this case, the test case ids should be separated by underscore and represented in the format "ID1_ID2_ID3_...". This should be rare for API tests.
  • Larger manual test case can be split into multiple test scripts. In this case, test case ids should be represented in format "ID_1, ID_2, ...". This should be rare for API tests.

NOTE:

You cannot mix #2 and #3.

Naming Variables

Within feature files, name variables in all lowercase with underscore as the word separator. Example "project_url" instead of "projectUrl".

Setting up reusable features

When a set of steps needs to be repeated in multiple scripts, create reusable scenarios:

  • Create a reusable feature file in the applicable service package
  • Prefix filename with "common_"
  • Add the reusable scenario to this file
  • Add @ignore tag to the scenario in the file
  • Call the feature file from your test. Refer to examples in docs.

Karate Training

Understanding REST

Great introduction article - https://www.smashingmagazine.com/2018/01/understanding-using-rest-api/

API testing is done with the following tools:

Postman for exploratory testing

Karate for automation

The following are public APIs that you can use to try out API testing tools. 

http://petstore.swagger.io/ 

https://jsonplaceholder.typicode.com/

https://reqres.in/

https://openweathermap.org/api

https://github.com/toddmotto/public-apis/blob/master/README.md

https://any-api.com/

Testing REST APIs

Postman

    Select one of these public APIs for your use getting started

    Install Postman

    Walk through Postman docs to get started - https://www.getpostman.com/docs/v6/

    Review your public API via Postman

Karate

    Install IDE as stated in the next section

    Review Karate readme at https://github.com/intuit/karate; walk through to understand basics

    Clone repos 

    Complete your machine set up

    Write sample tests for your public API using Karate

    Review Karate Usage Guidelines

        Cover the following items with Karate and your public API:

        Using Scenarios

        Using Scenario Outlines - https://github.com/intuit/karate#data-driven-tests

        Different types of asserts - https://github.com/intuit/karate#index > "Assert" row

        Reading in files - https://github.com/intuit/karate#reading-files

        Calling other feature files for code re-use - https://github.com/intuit/karate#calling-other-feature-files

        Using js function output in scenarios - https://github.com/intuit/karate#calling-javascript-functions

        Using Java method output in scenarios - https://github.com/intuit/karate#calling-java


I also recommend watching this video from the tool author - 

https://www.techgig.com/webinar/Karate-DSL-for-writing-web-service-API-acceptance-tests-BDD-1042


IDE Setup

    The project expects JDK 1.8 (at least jdk1.8.0_162), Maven 3.5.2 and JUnit 4.

    Install the following:

    Java Development Kit: JDK 8 (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)

    Apache Maven 3.5 or newer - binary zip archive (https://maven.apache.org/download.cgi)

    IDE: Eclipse IDE for Java EE Developers Oxygen or newer. NOTE: You need the Java EE Developers edition (http://www.eclipse.org/downloads/packages/)

Set JAVA and Maven environment variables: Under System variables,

    Define JAVA_HOME with the path to the JDK installation.

    For example:

    JAVA_HOME

    C:\Program Files\Java\jdk1.8.0_192

Add the following variables under Path:

    %JAVA_HOME%\bin

    <path to Maven folder>\bin

    For example: 'C:\apache-maven-3.5.2\bin'



In Eclipse, set up your workspace as follows:

    Set Maven path: Go to Window menu > Preferences > Maven > Installations, add Maven install location and set as default.

    Set JDK path: Go to Window menu > Preferences > Java > Installed JREs, add installed JDK (as Standard VM) and set as default.

    Set default Java path to the JDK: Go to Window menu > Preferences > Java > Installed JREs > Execution Environments, set 'JavaSE 1.8' to the JDK.

    JUnit comes pre-installed with Eclipse. No further configuration needed for this.

    Install the free Cucumber-Eclipse plugin. Go to Eclipse Help > Eclipse Marketplace and install the latest version. This will provide syntax-coloring for feature files.

Go to the Eclipse Preferences > Cucumber > User Settings, and enter the following Root Package Name: com.intuit.karate . This resolve an issue where you encounter "does not have a matching glue code" warnings (refer to the Cucumber-Eclipse wiki for more).

Your environment is set. Follow the Bitbucket repo readme instructions to clone and set up the project.

Friday, July 8, 2022

REST API Interview Questions and Answers

 Application Programming Interface or API, is an interface that sets up the communication 

medium between multiple software applications or even between mixed hardware and 

software applications. REST API is one of the most popular and easy to integrate APIs. 


1. What is a web service?

Web services are standard software systems that provide a common platform for various 

applications (written in different programming languages) to communicate over the network. 

They help in establishing client-server communication.


2. What does REST stand for?

REST stands for Representational State Transfer.


3. Explain REST and RESTFUL.

A software architectural style that defines a set of rules that are to be used for creating web 

services is known as REST. REST uses the HTTP Protocol. It, itself is not a protocol or a 

standard. 

Web services that follow the REST architectural style are known as RESTful web services. A 

RESTful system consists of:

- A client who requests a particular resource

- A server that has all the resources


4. Define the architectural style for creating a web API.

The architectural style for creating a web API are:

- HTTP for client-server communication

- XML/JSON as the formatting language

- Simple URI as the address for the services

- Stateless Communication


5. What are the HTTP methods supported by REST?

The HTTP methods supported by REST are as follows:

 GET: The GET method retrieves specific information from the server according to 

the specifications made by the URI.

 POST: The POST method modifies data on that particular server from which the 

request was sent.

 PUT: The PUT method is used to request that the message body that has been 

returned is stored under the location mentioned in the HTTP message.

 DELETE: The DELETE method is used to delete the specified resources.

 HEAD: The HEAD method is quite similar to the GET method. The only difference is 

that the HEAD method returns only the meta information and not the message body.


6. What are some of the key characteristics of REST?

- The REST API is stateless. It does not store data like user credentials and needs to be 

reminded of it with each new session. This feature helps in increasing scalability.

- It supports both JSON and XML, therefore catering to the varying expectations of the 

developer community.

- The REST architecture is simpler to implement as compared to SOAP.

- REST can be operated under limited resources and low network bandwidth.


7. What is meant by addressing in RESTful web services?

Addressing in RESTful web services refers to locating a resource or multiple resources 

present on the server. It is similar to locating the postal address of a person.


8. What is the use of JAXB in RESTful web API?

JAXB stands for Java Architecture for XML Binding. It is an XML-to-Java binding 

technology that enables the easy transformation of schema to Java objects and vice versa.

List the different application integration styles in real-time systems.

The different integration styles are:

- Directly accessing or sharing the database

- Batch file transfer or sharing

- Invoking remote procedure (RPC)

- Swapping asynchronous messages over a message-oriented middleware (MOM).


9. What is API Testing?

API testing is quite similar to software testing. It is used to determine if the developed APIs 

meet the expectations of that particular application’s REST On functionality, reliability, 

performance, and security of that particular application.


10. Mention some protocols used in API Testing.

Some commonly used protocols in API Testing are JMS, REST, HTTP, UDDI, and SOAP.


11. What are the common types of API Testing?

There is no fixed list as there is specialty testing as it depends upon the developer’s 

expectations and requirements. However, most tests can be broadly categorized into 9 types:

- Validation Testing

- Functional Testing

- UI Testing

- Load Testing

- Runtime/ Error Detection

- Security Testing

- Penetration Testing

- Fuzz Testing

- Interoperability and WS Compliance testing


12. Which are the parameters that must be checked when performing API testing?

In the process of API testing, a request is raised to the API with the known data. It helps in 

analyzing the response. So, while testing the API, the following parameters must be kept in 

mind:

- Data Accuracy

- Schema Validation

- HTTP Status Code

- Data type, validations, order, and completeness

- Authorization checks

- Implementation of response timeout

- Error codes in case API returns

- Non-functional testing like performance and security testing


13. List a few testing tools for web services for REST API.

- Spring REST web service using MVC

- Jersey API

- CXF

- Axis

- Restlet


14. Differentiate between SOAP and REST.

SOAP: SOAP (Simple Object Access Protocol) is a protocol through which two systems communicate by sharing XML documents. REST, on the other hand, supports many different formats of data. The reads on SOAP cannot be cached. SOAP runs on HTTP but envelopes the message. SOAP cannot use REST since it itself is a protocol while REST is an architectural pattern.

REST: (Representational State Transfer) is a service architecture and design for network based software architectures. SOAP only supports XML. The REST reads are cachable. REST uses the HTTP headers to hold meta information. REST can make use of SOAP as the underlying protocol for web services.


15. Specify the format of a URI in REST architecture.

The format of a URI is as follows:

<protocol>://<service-name>/<ResourceType>/<ResourceID>


16. Which web services method is available on read-only mode?

The operations under the GET method are read-only and are safe.


17. What is a “Resource” in REST?

REST considers all types of content as a resource; they can be text files, HTML pages, 

images, videos, or even dynamic business information. The REST server gives access to the 

resources and modifies them according to the different HTTP methods specified. Each 

resource is identified by URIs/ global IDs.


18. Which is the most popular way of representing a resource in REST?

Different representations are used by the REST architecture to define a particular resource. 

XML(Extensible Markup Language) and JSON(JavaScript Object Notation) are the most 

popular representations of resources.


19. Explain XML and JSON in brief.

XML:

 The Extensible Markup Language is quite similar to HTML. It is designed to store 

and transport data. One of its biggest advantages over HTML is that it allows users to 

create their own custom tags. XML is generally used to represent structured 

information like documents, data, configuration, etc.

JSON:

 JavaScript Object Notation is a lightweight format that has been designed to store and 

transport data. It represents structured data based on JavaScript object syntax. It is fast 

and easy to use and understand.


20. Which are the safe REST operations?

REST works on the HTTP protocol and hence, uses the HTTP methods to carry out its 

operations. The HTTP methods that do not change or modify the resources at the server are 

known as safe operations. The GET method returns the resource only in the read-only 

method, and the HEAD method returns the metadata of the resource and is, therefore, safe. 

The methods PUT, POST, and DELETE, on the other hand, modify the data at the server and 

are, therefore, considered unsafe.


21. Name the method that validates all controls on a page.

The Page.Validate() method validates all controls on a page.


22. Which library is used for JSON serialization in Web APIs?

The JSON.NET library is used for JSON serialization.


23. Who are the consumers of Web API?

Web APIs cater to a broad range of clients including browsers, and mobile devices. It is also 

used along with native applications that require web services but don’t support SOAP. Clients 

that support the HTTP methods like GET, DELETE, POST, can also use Web APIs.


24. What does it mean for an API to be stateless?

Statelessness is one of the key principles of REST architecture. In stateless communication, the server does not store any information about previous communications. In other words, the client and server do not know each other’s state. Every request and response is a new interaction, and each request includes everything the server needs to give a successful response.


25. What is CRUD?

Answer: CRUD stands for “Create, Read, Update, Delete.” These are the four basic actions that can be performed on databases through a REST API. Each action corresponds to an HTTP request method:

Create = POST

Read = GET

Update = PUT

Delete = DELETE


26. What are some common HTTP response status codes you might see when working with a REST API?

HTTP response status codes tell the client the result of the requested action (GET, POST, etc.). Some common codes you’ll see in HTTP responses are:

200 OK: The request succeeded.

201 Created: The request succeeded and a resource was created.

400 Bad Request: The request was not fulfilled due to an error in the request, such as a typo or missing data.

401 Unauthorized: The request was not fulfilled because the client is not authenticated or authorized to access the requested resource.

403 Forbidden: The request was not fulfilled because the client is authenticated, but not authorized to access the requested resource.

404 Not Found: The request was not fulfilled because the server could not locate the requested resource.

500 Internal Server Error: The request was not fulfilled due to an unexpected problem with the server. 

502 Bad Gateway: The request was not fulfilled due to an invalid response from an upstream server.

503 Service Unavailable: The server was unable to process the request due to maintenance, overloading, or another temporary interference.


27. What is caching?

Caching is the method of temporarily storing a copy of a server response in a location in order to retrieve it more quickly in the future. Caching improves server performance by reducing the work the server has to do to fulfill the request. Caching also makes applications that use the API run faster since they don’t need to send a new request every time they need a resource.

Cache duration of a resource is (i.e., how long the resource can be cached by the client before the resource is retrieved again) specified in the HTTP response header with the Cache-Control field.

Friday, June 24, 2022

Interview Question On JMeter

Here we can learn the basic Interview question and answers which are frequently asked in Performance Testing Interview on JMeter. 

1. Explain how JMeter works?

JMeter perform like a group of users sending the requests to a target server. It collects response from the target server and other statistics which show the performance of the application or server via graphs or tables. Apache JMeter testing involves using the open source Apache JMeter software for testing of software application. Apache JMeter testing is applied for performance check of both static and dynamic resources.  Apache JMeter simulates a heavy load on application, to test its strength or to analyze overall performance under different load types.

2. Where can we use functions and variables?

Variables and functions can be written into any field of any test component

3. Explain what is Samplers and Thread groups?

Thread group: For any test plan, JMeter is the beginning part of thread group elements. It is an important element of JMeter, where you can set a number of users and time to load all the users given in the thread group

Threads Group Properties:

Number of Threads = Number of users

Ramp-up period (in Seconds) = Ramp up speed during test is speed at which new simultaneous users are trying to access the application.

Loop Count = this property tells JMeter how many times to repeat your test. If you enter a loop count value of 1, then JMeter will run your test only one.

Samplers: Sampler generates one or more sample results; these sample results have many attributes like elapsed time, data size, etc. Samplers allow JMeter to send specific types of requests to the server, through samplers, thread group decides which type of request it needs to make. Some of the useful samplers are HTTP request, FTP request, JDBC request and so on.

4. Explain what is Test Fragment?

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.

5. Explain what is Assertion in JMeter? What are the types of assertion?

Assertion helps to verify that your server under test returns the expected results - Some commonly used Assertion in JMeter are

Response Assertion

Duration Assertion

Size Assertion

XML Assertion

HTML Assertion

6. Can you explain about JMeter Listeners?

Some of the JMeter Listeners are -

Spline Visualizer

Aggregate Report

View Result Tree

View Result in Table

Monitor Results

Distribution Graph

BeanShell Listener

Summary Report and so on

7. What are the important plugins supported in JMeter?

Thread group Plugin

Listeners Plugin

Samplers Plugin

8. Can you explain about STLC phases - Software Testing Life Cycle

Requirement analysis.

Test planning.

Test case design and development.

Test environment setup.

Test execution.

Test cycle closure.

9. Usually at what timeframe we do the performance testing ? 

After the regression build deployed for testing and there are no major defect logged against the build. 

10. What is the The 95th percentile?

The 95th percentile is a number that is greater than 95% of the numbers in a given set. The reason this statistic is so useful in measuring data throughput is that it gives a very accurate picture of the maximum traffic generated on an interface. This is a standard measure used in interpreting performance data.

11. What is concurrency testing?

many users have logged into their Flipkart account at a time and the same time multiple users ordering the same product, so testing how the software is behaving at that situation is an example of concurrency testing

12. What is concurrent user and parallel user , simultaneous users ?

Concurrent Users: When multiple users access a website but perform different-different actions at the same time is called concurrent users. Simultaneous Users: When multiple users access a website and Perform the same action at the same time is called simultaneous users.

13. What is Pacing and Think time?

Think time: This is the time interval which is used between transactions, within an iteration. It is used to give a delay which corresponds to the real time interval which a user may take in between performing two actions (say Click). Pacing: Pacing is the time delay given between iterations.

14. Explain performance Testing life cycle ?

Performance testing life cycle (PTLC):

PTLC is a systematic approach to carry out the non-functional testing of a software system or application. Mostly all the software industries follow this process to plan the performance testing activities and find out the performance bottleneck in the software system.

PTLC defines different phases of performance testing as mentioned below-

Risk Assessment- To check the eligibility of the components for performance testing on the basis of a risk score.

Requirement Gathering & Analysis - To understand the client’s expectation and conclude the requirements

Performance Test Planning - To prepare test strategy as per Non-Functional Requirement

Performance Test Design (Scripting) - To create the test scripts as per the approved Performance Test Plan

Workload Modelling - To create the workload scenario as per the approved Performance Test Plan using test scripts

Performance Test Execution & Result Analysis - To execute the performance tests as per timelines documented in the approved Performance Test Plan and analyse the test results

Reporting and Recommendation - To prepare and publish the test report and provide the recommendations

15. What is bottleneck in performance testing?

A performance bottleneck occurs when the rate at which data is accessed cannot meet specified system requirements. 

16. How can we manage session and cookies in JMeter?

We can manage the sessions and cookies in Jmeter by using config elements like HTTP Cache Manager which provides an option to clear the cookies in every iteration and also allows to add user-defined cookies.

17. Explain the architecture of JMeter.

Jmeter is an open source application which is Java based, designed for the purpose of Load Testing. Jmeter supports all major protocols which are supported in Load Runner. But unlike any browser, Jmeter works on different levels of protocols and does not execute JavaScript present in HTML web pages.

18. How can JMeter simulate actual browser behavior?

JMeter does not support the actual browser behavior as it does not render the HTML webpages as the normal browser. Such that response can be seen in HTML format but the actual timings are not there in the generated samples.

19. What is the use of Regular Expression in JMeter?

Regular Expression in Jmeter is used for extracting some values dynamically from the responses with an objective to use to it in the subsequent request or save it for reporting purposes. Regular Expression is used in both Pre-Processors as well as Post Processors.

20. What are the different methods used in Data Parametrization in JMeter?

The objective of data parametrization is to make the scripts reusable where the values need not be hardcoded for the same request with different parameters.  The data parametrization that is supported in Jmeter are -

1. CSV Data Set Config

2. User Defined Variables

21. How many maximum threads are recommended on a single system?

The recommendation of maximum threads on a single system is based on the hardware configuration of the system which includes a processor, JVM, allocated memory -Xmx, etc.

There are other factors as well that impact this such as the number of components in the test plan like the number of config elements or processors and it also depends on whether you are using GUI/Non-GUI Mode.

22. What is the purpose of listeners?

Listeners are majorly used for storing the execution results of load testing in different forms like table, graph, tree or in any other presentable format which can be presented to the client.

23. What is the difference between Gaussian and Poisson Timers?

Since both Gaussian and Poisson Timers work on a mathematical formula that has some constant delay and additional offset. The point of difference between the Gaussian and Poisson Timers is because of in the fact that the lambda value is calculated in case of Poisson timer and deviation is calculated in case of Gaussian Timer.

24. What is the primary use of co-relation in JMeter?

Co-relation is basically a process in which the values can be extracted from the server response and stored in a variable which is then then used in any other request which is to follow.

For instance in order to test any login functionality if you have to use session ID/cookie ID , you can then extract the value from the response of GET request of the login page and then dynamically use the same while making POST request for login.

There are different type of inbuilt listeners in JMeter and many others can be imported into it by using plugins as per the requirement.

There are some inbuilt listeners like View Results in Table, View Results Tree, Graph Results, Aggregate Graph, Aggregate Report, Assertion Results and Response Time Graph.

25. What will be flow of Test Script Recorder?

The Test Script Recorder is majorly used to record all the http(s) request which is going to the server from the application. Such that there are some other configurations that are required to be done in JMeter in order to make it functional.

We should follow the following steps to record https traffic

1. Firstly add HTTP(s) Test Script Recorder to Work-Bench.

2. Then enter the port number which you want to start your proxy server from.

3. Thirdly select the Target either as “Workbench” only or add a Recording Controller in the test plan and select the same as Target so that all the recordings are stored under it.

4. Next start the Proxy Server.

5. Lastly configure the browser with manual proxy settings pointing to the same port number used in the test script recorder.

26. How can JMeter record actions from Mobile?

Jmeter can record HTTP or https request going to the server from your mobile application also. Therefore Mobile and Jmeter should be on the same network.

The configuration required to record actions from Mobile,

1. First configure the proxy server in JMeter to run at a specified port.

2. Second set up a proxy on the mobile wifi settings and then enter the same port number that is used in the recorder.

3. Third install the Root CA certificate on the mobile.

4. Fourth hit server request from the mobile and observe it getting captured by the specified controller.

27. How would you do master-slave configuration in Jmeter?

Master-Slave configuration is considered as a part of Distributed Testing in which case more than one machine is used to perform load testing of the server under test. Such that it becomes important that all machines are on the same network and all have the same version of Jmeter. Also in distributed testing, one machine is made as the Master and the others are kept as slaves by doing some configurations.

Steps to perform master-slave configuration are -

1. Edit the jmeter.properties file on the master machine, and add the IP addresses of slave machines against the remote_host field in the file.

2. Next save the file and open the Jmeter again.

3. Now from the RUN menu in Jmeter, select Remote Start and choose the IP of the machine to be invoked.

4. Choose RUN menu and select Remote Start all to start all the slave machines for testing.

28. Would you recommend to run JMeter in GUI Mode?

Definitely Yes, JMeter tests can be run both GUI as well as Non-GUI Mode.

But it is recommended to run the load test in Non-GUI mode since AWT Event Thread can kill the tests in case of high load scenarios.

Some of the Non-GUI mode supported with Jmeter such as - Command Line, ANT Plugin, MAVEN Plugin, and Jenkins.

29. Can to run Selenium scripts in JMeter?

We can run selenium scripts in JMeter to get some ideas on their performance.

This can be done by either using Junit libraries to build Selenium scripts and save as Jars and copy the same in JMeter directory. Else add Junit sampler to the test plan and import the Jar file.

Otherwise, we can add the Webdriver sampler plugin in the JMeter ext folder and then restart the Jmeter. We can then write the selenium code in the Webdriver sampler and then execute to see the performance.

The HTTP Cache manager primarily helps you in clearing cache after each iteration as per your requirement in the load tests and thereby limit the number of elements that can be stored in the cache. In which case both the config elements can be attached to the HTTP sampler.

30. Let us suppose I have multiple screens in my mobile app. Then can JMeter measure the time taken to flip the screens or can JMeter measure the performance of a complete application?

At no point of time JMeter measure the transition time between the screens. As it can only measure the server actions not the UI interactions.

31. What is the use of Workbench?

Workbench is primarily used as a storage area for adding components that can be added to test plan as and when required.

Such that the components of workbench does not get saved with the test plan automatically. They have to be saved separately as test fragments.

Workbench is known for HTTP(s) Test script recorder which is extremely useful in recording the https request and later load can be applied on them to measure the response time.

32. Which programming language does JMeter is based on?

JMeter is based on JAVA programming language and not on other programming languages.

33. Which XML parser is present in JMeter?

JMeter comes with Apache's Xerces XML parser and not with other listed options.

34. What is the default protocol used when testing a web server using SSL encryption?

TLS is used when testing a web server using SSL encryption

35. What is the default port for LDAP over SSL

The default port for LDAP over SSL is 625

36. What is Throughput?

Basically, “Throughput” is the amount of proceedings produced over time during a test.

37. How can we verify that a request is successful ?

Response Assertion is a great function for verifying the response status of a server. 

38. What is Latency in API testing?

Latency refers to the response time or the delay taken by the request to reach the server. We need to ensure that the latency involved in reaching the server is minimum as higher the latency, greater is the impact in the application’s speed and performance