Automation QA Testing Course Content

General QA InterviewQuestions

 


1)First and foremost question—- Tell me about yourself
2)Where have you implemented OOPS concepts in your automation framework?
3)A situation will be given and they will ask you to tell the high level scenarios which you can think of.
4)Another similar type of question would be asked where acceptance criteria is given and some conditions are given , in this case make sure explain the test cases by considering( positive, negative and a non functional test case).
5)Say you are assigned a new feature how do you do story pointing ? ( consider manual and automation testing here)
6) As a QE how does your day look like?
7)What is your role in Agile activities? (Like in planning,retrospective meetings, grooming etc)
8)Now say a page is broken or some feature is broken how do you debug?
9)Say you have raised a bug and you know it’s an important bug but the developer does not agree, how will you bring the developer on the same page or convince the dev?


QA Automation Practice WebSites

 

Top Playground Platforms for QA Automation Practice:

1)the-internet.herokuapp: https://lnkd.in/dF6SEMxb

2)Ultestingplayground:https://lnkd.in/d68AqPkb

3) The Playground:https://lnkd.in/dak57wGZ

4)Demo QA: https://demoqa.com/

5) Selenium Test Pages:https://lnkd.in/dHcHytYH

6) LetCode:https://letcode.in/test

7) UltimateQA:https://lnkd.in/dVkefCqW

8) Selectors Hub Practice Page:https://lnkd.in/dsA9JdSn

9) WebDriver University:https://lnkd.in/dhZ6H4Sy

Rest Assured Interview Questions


Common Rest Assured Interview Questions for a QE:


1)Difference between Path and Query Parameters with an example
2)How to send a GET request using Rest Assured?
3)How to log response in Rest Assured only in the case of an error.
4)Explain different ways of extracting a single field from a response body.[like using response, JSONPath,XMLPath] and also they will give you the response of a request and ask you to extract the response of a particular field.
5)How to mask header information in API testing using Rest Assured?
6)How to download a file using rest assured?
7)How do you handle form parameters and multipart parameters[uploading media file]?
8)They will give you an end to end scenario and ask how will you write the rest assured code for that [ they are trying to understand how well can you do the API chaining here , you can just explain also]
9)What import statement will you use for Rest Assured to work?
10)How to check that a specific item is present in a collection using Rest Assured?[we can use Matchers here]
11)What are the common exceptions you encounter in Rest Assured?
12)Explain the rest Assured framework you wrote in your previous org?
13)How do you handle data in Rest Assured? [POJO, Excel,config file,HashMaps]
14)What is the use of ResponseSpecification in Rest Assured?
15)How do you handle authentication and authorization in Rest Assured tests?[basic, oauth,digest,custom]
16)What are the common pitfalls or challenges you have faced while using Rest Assured, and how did you overcome them?
17)What is the difference between given(), when(), and then() methods in Rest Assured and explain with an example.
18)How do you handle cookies in Rest Assured tests?
19)How can you handle timeouts and retries in Rest Assured tests?
20)Reporting in Rest Assured.
21)How do you enable parallel execution of Rest Assured tests? [TestNG,XML]
22)How do you verify the status code of an HTTP response using Rest Assured?
23)How do you handle dynamic status codes or scenarios where the status code may change between test runs?
24)How can you handle dynamic data or parameters in Rest Assured requests?

25)Difference between serialization and deserialization and explain using code



REST API Vs. GraphQL


REST API Vs. GraphQL



When it comes to API design, REST and GraphQL each have their own strengths and weaknesses.

REST
- Uses standard HTTP methods like GET, POST, PUT, DELETE for CRUD operations.
- Works well when you need simple, uniform interfaces between separate services/applications.
- Caching strategies are straightforward to implement.
- The downside is it may require multiple roundtrips to assemble related data from separate endpoints.

GraphQL
- Provides a single endpoint for clients to query for precisely the data they need.
- Clients specify the exact fields required in nested queries, and the server returns optimized payloads containing just those fields.
- Supports Mutations for modifying data and Subscriptions for real-time notifications.
- Great for aggregating data from multiple sources and works well with rapidly evolving frontend requirements.
- However, it shifts complexity to the client side and can allow abusive queries if not properly safeguarded
- Caching strategies can be more complicated than REST.

The best choice between REST and GraphQL depends on the specific requirements of the application and development team. GraphQL is a good fit for complex or frequently changing frontend needs, while REST suits applications where simple and consistent contracts are preferred.

Three Different Ways on Cucumber Runner

 

Three Different Ways on Cucumber Runner



I have been working on Web automation projects. Generally, I prefer to use Cucumber due to providing behavior-driven development.
Every project needs a different approach for execution. We need a runner class for executing feature files, but which test framework is better to use with Cucumber? I have three different options, two with TestNG and one with JUnit. You can prefer as your project needs.
I’m listing from the simplest to the most complex ones.

  1. Cucumber Runner with JUnit
    The first example is being created by Cucumber-JUnit and JUnit dependencies. I had been using it for an API project because I didn’t need TestNG annotation to perform it.
package myTestRunners;
import io.cucumber.junit.Cucumber;
import io.cucumber.testng.CucumberOptions;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/test/resources/functionalTests",
glue= {"myStepDefinitions" , "myHooks"},
tags = "@chrome",
plugin = { "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:",
"timeline:test-output-thread/",
"rerun:src/test/resources/failedrerun.txt"},
monochrome = true,
publish = true
)
public class TestRunnerWithJunit {
@BeforeClass
void beforeClass() {
}
@AfterClass
void afterClass() {
}
} ============================================================================= 2) Cucumber Runner with TestNG (AbstractTestNGCucumberTests)
This example is being created by Cucumber-TestNG and TestNG dependencies. Using the advantages of TestNG, Test XML files can be created and feature files can be performed. We can execute more than one runner class by creating the XML file as concurrently.
package myTestRunners;

import io.cucumber.testng.AbstractTestNGCucumberTests;
import io.cucumber.testng.CucumberOptions;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;


@CucumberOptions(
        features = "src/test/resources/functionalTests",
        glue= {"myStepDefinitions" , "myHooks"},
        tags = "@chrome",
        plugin = { "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:",
                "timeline:test-output-thread/",
                "rerun:src/test/resources/failedrerun.txt"},
        monochrome = true,
        publish = true
)

public class TestRunner extends AbstractTestNGCucumberTests {

    @BeforeTest
    void beforeTest() {

    }

    @AfterTest
    void AfterTest() {

    }
}
===========================================================================
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite thread-count="2" name="Example Project" parallel="tests">

    <test name="TestRunner1">
        <classes>
            <class name="myTestRunners.TestRunner" />
        </classes>
    </test>
    <test name="TestRunner2">
        <classes>
            <class name="myTestRunners.TestRunner" />
        </classes>
    </test>

</suite>
=================================================================================
3) Cucumber Runner with TestNG (IRetryAnalyzer)
Sometimes one execution may not be enough for a test. IRetryAnalyzer provides repetitive execution. Now I’m working on Cucumber 6.11.0 and TestNG 7.5 versions. This runner class was created by using these versions. Please feel free to comment if you have any issues while applying your project! :)
package myTestRunners;

import io.cucumber.testng.*;
import org.testng.IRetryAnalyzer;
import org.testng.ITestResult;
import org.testng.annotations.*;
@CucumberOptions(
        features = "src/test/resources/functionalTests",
        glue= {"myStepDefinitions" , "myHooks"},
        tags = "@chrome",
        plugin = { "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:",
                "timeline:test-output-thread/",
                "rerun:src/test/resources/failedrerun.txt"},
        monochrome = true,
        publish = true
)
public class TestRunnerWithRetry implements IRetryAnalyzer {

    private TestNGCucumberRunner testNGCucumberRunner;
    private int count = 0;
    private static int maxTry = 3;

    @Override
    public boolean retry(ITestResult iTestResult) {
        if (!iTestResult.isSuccess()) {  ;
            if (count < maxTry) {
                count++;
                iTestResult.setStatus(ITestResult.FAILURE);
                return true;
            } else {
                iTestResult.setStatus(ITestResult.FAILURE);
            }
        } else {
            iTestResult.setStatus(ITestResult.SUCCESS);
        }
        return false;
    }

    @BeforeClass(alwaysRun = true)
    public void setUpClass() throws Exception {
        System.out.println("Before Scenario ****");
        testNGCucumberRunner = new TestNGCucumberRunner(this.getClass());
    }

    @Test(groups = "cucumber", description = "Runs Cucumber Scenarios",
            dataProvider = "scenarios",retryAnalyzer = TestRunnerWithRetry.class)
    public void scenario(PickleWrapper pickleEvent, FeatureWrapper cucumberFeature) {
        testNGCucumberRunner.runScenario(pickleEvent.getPickle());
    }

    @DataProvider
    public Object[][] scenarios() {
        return testNGCucumberRunner.provideScenarios();
    }

    @AfterClass(alwaysRun = true)
    public void tearDownClass() {
        System.out.println("After Scenario ****");
        testNGCucumberRunner.finish();
    }
}
============================================================================
Resources: Features example:
https://courgette-testing.com/bdd