KEMBAR78
QC Interview Questions | PDF | Software Design | Information Science
0% found this document useful (0 votes)
13 views7 pages

QC Interview Questions

The document provides a comprehensive overview of various database, API testing, and automation interview questions and answers. It covers topics such as DDL vs DML, SQL joins, HTTP methods, status codes, and Selenium wait types. Additionally, it discusses automation frameworks, assertions, and element selectors in Selenium WebDriver.

Uploaded by

omar97alaa.qa
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)
13 views7 pages

QC Interview Questions

The document provides a comprehensive overview of various database, API testing, and automation interview questions and answers. It covers topics such as DDL vs DML, SQL joins, HTTP methods, status codes, and Selenium wait types. Additionally, it discusses automation frameworks, assertions, and element selectors in Selenium WebDriver.

Uploaded by

omar97alaa.qa
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

BD Interview Questions:

1. What is the Difference between DDL & DML?

Data Definition Language (DDL):

DDL is used to define the structure of a database. It includes commands that allow you to
create, modify, and delete database objects such as tables, indexes, views, and schemas. Some
common DDL commands include:

1. CREATE: Used to create database objects like tables, indexes, views, or schemas.
2. ALTER: Used to modify the structure of existing database objects, such as adding or
dropping columns from a table.
3. DROP: Used to delete database objects, such as tables, views, or indexes.
4. TRUNCATE: Used to delete all the rows from a table, but it retains the table structure.
5. COMMENT: Used to add comments to the data dictionary.
6. RENAME: Used to rename an existing database object.

Data Manipulation Language (DML):

DML is used to manipulate data stored in the database. It includes commands that allow you to
insert, update, delete, and retrieve data from database tables. Some common DML commands
include:

1. SELECT: Used to retrieve data from one or more tables.


2. INSERT: Used to add new rows of data into a table.
3. UPDATE: Used to modify existing data in a table.
4. DELETE: Used to remove rows from a table.
5. MERGE: Used to perform insert, update, or delete operations on a target table based on
the results of a join with a source table.

2. What is the difference between Where and Having clauses?

WHERE: Condition, can be used to Select, Update ad Delete, retrieves list


Ex: Select students where age < 18
HAVING: Condition after grouping, used to Select only, data retrieved is grouped
Ex: Select Students
group by age
Having no. of rows < 2
3. Difference between different types of Joins?
Inner: retrieves all matched records between tables.
Full Outer: retrieves all records in 2 tables.
Left join: retrieves all in left and matched only in right.
Right join: retrieves all in right and matched data only in left.

4. What is the subquery?


One query is nested in another one.
Ex: Select Max(items) from (Select order_id as Items from Orders)

5. What is the primary key? And foreign key?

 A primary key is a column or a set of columns that uniquely identifies each row in a
table. It must be unique and not null.

 A foreign key is a column or a set of columns in a table that refers to the primary key of
another table. It establishes a relationship between two tables.
API Testing Questions
1. What are the common HTTP methods used in RESTful APIs?

 GET: Retrieve data from the server.


 POST: Send data to the server to create a new resource.
 PUT: Send data to the server to update an existing resource.
 DELETE: Remove a resource from the server.
 PATCH: Partially update a resource on the server.
 What is the status code?

2. There are five classes of status codes:

1. 1xx - Informational: These status codes indicate that the server has received the
request and is processing it. They are informational and rarely used in practice.
2. 2xx - Success: These status codes indicate that the request was successful and the
server has fulfilled it. For example:
o 200 OK: Request succeeded.
o 201 Created: The request resulted in a new resource being created.
o 204 No Content: Request succeeded, but there is no content to return.
3. 3xx - Redirection: These status codes indicate that further action needs to be taken by
the client to complete the request. For example:
o 301 Moved Permanently: The resource has been permanently moved to a new
URL.
o 302 Found: The resource has been temporarily moved to a different URL.
o 304 Not Modified: The resource has not been modified since the last request and
can be retrieved from the cache.
4. 4xx - Client Error: These status codes indicate that there was an error on the client's
side, such as an invalid request or insufficient permissions. For example:
o 400 Bad Request: The server could not understand the request due to
malformed syntax.
o 401 Unauthorized: The client must authenticate itself to get the requested
response.
o 404 Not Found: The requested resource could not be found on the server.
5. 5xx - Server Error: These status codes indicate that there was an error on the server's
side while processing the request. For example:
o 500 Internal Server Error: The server encountered an unexpected condition that
prevented it from fulfilling the request.
o 503 Service Unavailable: The server is currently unable to handle the request due
to temporary overload or maintenance.

Status codes provide valuable information to both clients and developers, helping to diagnose
and troubleshoot issues with web server interactions.
3. What components typically make up an API endpoint?

1. Base URL: The root domain and path where the API is hosted.
2. Resource Path: The location or identifier of the specific resource within the API.
3. Query Parameters: Optional parameters are appended to the endpoint URL to provide
additional information or filter the results.
Automation Questions
1. What are the types of framework do you use, did you beuild it from
scratch?
Keyword
Data driven.
Modular

2. How do you maintain the data of URL and credentials data:


Store in a separate file (data driven where both input and output data are stored
in separate file)

3. How do you handle working with a colleague on the same project?


Ask about the version control)

4. How do you handle the high change in the automation scripts:

5. What is the POM file and what info should it include?

XML file, to configure the parameters in Maven ex: source directory, test
directory, is used in design pattern.

6. Difference between driver. quit & driver. close?


In summary, the driver.quit() closes all browser windows and terminates the WebDriver
session, while driver.close() closes the current browser window or tab without ending
the session.

7. Difference between Navigate.to $ driver. get

In summary, both navigate().to() and get() methods serve the purpose of navigating to a
URL in the browser, but navigate().to() provides additional navigation features and is
used for more advanced navigation scenarios. get() is commonly used for simple
navigation and page loading.

8. What is the difference between hard and soft assertions?

Hard: Throw exception when it fails and continue


Soft: Doesn’t throw exception when fails and continue
Keywords assert equal, assert not equal, assert true, assert false, assert null and not null.
9. What are the type of waits in Selenium and JAVA?

1. Implicit Wait:
o Wait for a certain interval before throwing an exception
o Set using implicitlyWait() method.
2. Explicit Wait:
o Wait for a certain of condition before throwing an exception
o Allows waiting for elements to become visible, clickable, or meet custom
conditions.
o Implemented using WebDriverWait and ExpectedConditions classes.
3. Fluent Wait:
o Check the condition frequently at certain intervals before throwing an exception
o Configured using the Wait interface with methods like withTimeout(),
pollingEvery(), and ignoring().
4. Sleep:
o Static wait that pauses test execution for a specified duration.
o Not recommended for general use as it's not flexible and can lead to longer test
execution times.
o Used as a last resort when other wait types are not applicable.

9. What are the Selector types?

ID Selector:

 Locates elements by their unique id attribute.

Name Selector:

 Locates elements by their name attribute.

Class Name Selector:

 Locates elements by their class attribute.

Tag Name Selector:

 Locates elements by their HTML tag name.

Link Text Selector:

 Locates <a> (anchor) elements by their visible text.

Partial Link Text Selector:


 Locates <a> (anchor) elements by a partial match of their visible text.

CSS Selector:

 Locates elements using CSS selectors.

XPath Selector:

 Locates elements using XPath expressions.

10.Find elements and find elements?


In summary, findElement() is used to locate a single web element based on the specified
criteria, while findElements() is used to locate multiple elements and returns a list of
WebElement objects. Both methods are essential for interacting with web elements in
Selenium WebDriver tests, and the choice between them depends on whether you need
to interact with a single element or multiple elements on the page.

You might also like