0% found this document useful (0 votes)
16 views

Manual Testing Questions

The document discusses various types of manual testing like unit testing, integration testing, system testing, sanity testing, smoke testing and exploratory testing. It also provides examples of these types of testing. Key points covered are: - Unit testing verifies small code snippets and checks code coverage using tools like JUnit. - Integration testing combines modules and checks for broken pages or failed functionality. - System testing performs end-to-end functionality testing to confirm the application works as intended. - Sanity testing verifies bugs are fixed and no new bugs are introduced after fixes. - Smoke testing checks core functionality like page loading and usable elements. - Exploratory testing explores the application without test cases by first-time users

Uploaded by

Richa Vaishnav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Manual Testing Questions

The document discusses various types of manual testing like unit testing, integration testing, system testing, sanity testing, smoke testing and exploratory testing. It also provides examples of these types of testing. Key points covered are: - Unit testing verifies small code snippets and checks code coverage using tools like JUnit. - Integration testing combines modules and checks for broken pages or failed functionality. - System testing performs end-to-end functionality testing to confirm the application works as intended. - Sanity testing verifies bugs are fixed and no new bugs are introduced after fixes. - Smoke testing checks core functionality like page loading and usable elements. - Exploratory testing explores the application without test cases by first-time users

Uploaded by

Richa Vaishnav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Manual Testing Questions:

What are web-based applications?

Answer: Web-based applications need web servers to host them, visitors need interne t

connection and a browser to access the website and internally web sites process user requests and send
responses via hyper Text Transfer Protocol (HTTP). Multiple users can access same feature of web
application at same time simultaneously.

Examples of web-based applications are e-commerce portals for online purchase of products of our
choice (amazon.com, Flipkart, bookmyshow.com), websites of most of companies, universities, search
engines (google.com, altavista.com)

How to test web-based applications?

Answer: web-based applications require browsers such as (Internet Explorer, Chrome, Firefox, Safari,

Opera), and a reliable internet connection to explore. Web -based applications can be tested for
functionality testing for any invalid page redirects, broken links, page not displaying.

Working of web elements such as input field, drop-down list, checkbox, radio button, submit button.
verify for valid input data entered, methods used while data submits, compatibility tests for browsers

used, performance to test latency (time taken to access pages), delay in opening next pages or output,
and Security testing for verifying login for authentication.

What is Unit testing?

Answer: Unit testing is primary test level, one way is static testing, where code is verified for syntax,

rules followed by organization which is conducted by developer, second way is dynamic testing where
small snippet of code is debug (tested) with sample test data to validate the output. Various tools for
unit testing are JUnit, Hansel, and Testing are used to verify code coverage.

What is sanity testing?

Answer: When application build is released after bugs fixed from the developer, and or changes due to
additional requirement, the testing carried out is called sanity test, to verify that bugs are fixed, still

functionality is in place, and no new bugs or defects are observed. In case while running sanity tests,
bugs still exists, testers can reject the build.

Example of sanity test can be like remember me checkbox was installed against the bug raised, but
forget password link stops working, then it is a new bug.

What is smoke testing?


Answer: When software build is released, tester conducts primary tests like all the menus and submenus
are clickable, and display the corresponding page, tester make sure that mod ules and feature are

present in application, and there is absence of ‘Page Not found’ message while accessing any page,
Forms and Pages have all usable web elements and display stable pages.

Example, drop down list in all the input form does not display it ems for user to select, due to any

reason, this if found during the smoke test, then tester will stop testing and can reject the build by
informing the short coming to development team.

What is exploratory testing?

Answer: Tester use testing experience, while testing an application, explores the features and learn

about how the application works, during testing, he makes note of how the application be have s, and

such tests are called exploratory testing. The requirement document is absent, and testers are exposed
to the application first time, without any test cases created.

What is integration testing?

Answer: Integration testing is the second level of testing after unit testing, where different modules are
combined together and then tested for verifying that data flow in sync between the modules and there

is no a broken page or failed functionality.

Example – During integration testing, IRCTC site can be checked where after searching train, booking
seats in particular train, when payment gateway , which is integrated in to application found not

working.

What is system testing?

Answer: System testing is the third level of testing after integration testing, where the application under
test is tested for an end to end functionality, to confirm that it works as desired.

Example – matrimonial portal can be tested from registration, searching candidate, receiving contact
details and meet or fix appointments with prospects.

Selenium Questions:
What is the difference between the setSpeed() and sleep() methods?

Answer: These methods will delay the speed of the execution.

Thread.sleep(): The current thread will stop for a specified period of time. It only waits once when the
command is given and takes only a single argument that is Integer format.

set sleep(): This command will stop the execution for every selenium command used only for
demonstration purposes and a slow web application.
Explain how you can find broken images on a page using the Selenium Web driver?

Answer: To find the broken images on a page using the Selenium web driver is

• Get XPath and get all the links on the page using the tag name

• On the page click on each and every link

• Look for 404/500 in the target page title

Mention 5 different exceptions we had in the Selenium web driver.

Answer: The 5 different exceptions are

WebDriverException

NoAlertPresentException

NoSuchWindowException

NoSuchElementException

TimeoutException

Will driver.findElements() throw an exception

Answer: driver. findElements() will not throw any exceptions instead it will return an empty list if the
element is not found on the current page.

How to right-click /context-click on an element


Answer: Using Actions class contextclick() function

What is the return type of getwindowhandle() and getwindowHandles()


1- String
2- Set<String>

what are the approach to handle dynamic elements in selenium


1.Use Relative XPath using contains or starts with text
This is the preferred method for handling dynamic web elements if you observe a pattern in the
attribute values like ID or Class of the web element.

For eg consider the HTML snippet:


<input type="submit" id=" submit_334350" value="Subscribe">

This Subscribe button on the page has an ID with a dynamically changing number in it (‘334350’). This
keeps on changing every time you refresh the page. But it always starts with submit. So you can use a
relative XPath as given below to identify the web element:

XPath - //input[starts-with(@id, ‘submit_’)]

Now, consider another example:


<input type="submit" id=" 1002-subscribe" value="Subscribe">

In this case you can write XPath as:


XPath - //input[contains(@id, ‘subscribe’)]

2.Identify by index
Sometimes, you will have multiple elements with same locator value. For example there may be two
submit buttons with id starting with ‘Submit’. In this case you can use findElements method and locate
the element using the index.
driver.findElements(By.xpath(//*[contains(@id, ‘submit’).get(0).click();

Here get(0) is used to get the first web element with matching XPath.

3.Use Multiple attributes to locate an element


To identify a particular element you can use multiple attributes if a single attribute is not enough to
identify your web element uniquely.

Xpath- //button[starts-with(@id, 'save') and contains(@class,'publish')]

API Testing:
What are the main differences between API and Web Service?

All Web services are APIs but not all APIs are Web services.
Web services might not contain all the specifications and cannot perform all the tasks that APIs would
perform.
A Web service uses only three styles of use: SOAP, REST and XML-RPC for communication whereas API
may be exposed to in multiple ways.
A Web service always needs a network to operate while APIs don’t need a network for operation.

What are the common API testing types?


1. Validation Testing
2. Functional Testing
3. UI testing
4. Load testing
5. Runtime/ Error Detection
6. Security testing
7. Penetration testing

What must be checked when performing API testing?


While testing an API, you should consider:
1. Accuracy of data
2. Schema validation
3. HTTP status codes
4. Data type, validations, order and completeness
5. Authorization checks
6. Implementation of response timeout
7. Error codes in case API returns, and
8. Non-functional testing like performance
9. Security Testing

What are major challenges faced in API testing?


Major Challenges in API Testing are :
 Parameter Selection
 Parameter Combination
 Call sequencing
 Output verification and validation
 Another important challenge is providing input values, which is very difficult as GUI is not
available in this case.

Java:
Write a Java Program to Check the Pallindrom Number.
public static boolean isPallindrome(int num) {
int original = num;
int reversed = 0;
while (num > 0) {
int remainder = num % 10;
reversed = reversed * 10 + remainder;
num /= 10;
}
return original == reversed;
}
}
Write a Java Program to Calculate the factorial of any number.
public static int calculateFactorial(int num) {
int result = 1;
for (int i = num; i > 0; i--) {
result *= i;
}
return result;
}
}
Write a Java Program to find the highest number from Array.
public static void findHighest(int[] numbers) {
int highest = numbers[0];
for (int i = 1; i < numbers.length; i++) {
if (numbers[i] > highest) {
highest = numbers[i];
}
}
System.out.println("The highest number is " + highest);}
}

You might also like