Tuesday, 13 October 2020

Top 40 Interview Questions on Automation Testing - Selenium for SDET/Automation QA? Set-04

 

 

Check questions from 1 to 10 below:

Question set 11 to 20:
Qus Set - 11 to 20

Question set 21 to 30:

31. How to rerun failed test cases in Selenium using TestNG?
Click here to answer

32. What approach to take if clear() method is not working on a textbox?

sendKeys(Keys.chord(Keys.CONTROL,"a",Keys.DELETE));

 33. How to run test case in parallel for multiple browsers?

<suite name="Automation Test Suite " parallel="tests" thread-count="2">
    <test name="Automation Test CasesChrome">
        <classes>
              <class name="com.task.automation.testtwo.testone"/>
        </classes>
   </test>
   <test name="Automation Test Casesfirefox">
        <classes>
              <class name="com.task.automation.testtwo.testfirefox"/>
        </classes>
   </test>
</suite>

34. Create a common method for Explicit wait to check element is visible or not?

public void waitForElementVisible(WebElement element, long timeout) {

        try {
            new WebDriverWait(driver, timeout).until(ExpectedConditions.visibilityOf(element));
        } catch (ElementNotVisibleException e) {
            Reporter.log(element.toString() + "is not visible");
            Reporter.log(e.getStackTrace().toString());
        }

    }
Top API Interview Question 11-20 

35.  How to prepare automation test estimation ?

Click here for answer

36.  How to launch batch file from Selenium WebDriver?

 Process batch = Runtime.getRuntime.exec("path of the batch file");

37. How to run selenium test from command line?

java -classpath ".;selenium-server-standalone-2.33.0.jar" SampleClass

38. What is the name of the super interface of the Webdriver?

Ans: SearchContext.

39. Explain some of the strategy you have followed while using xpath?

Click here for answer

40. How to execute the testng test suite from the command line?

Ans: java -cp “C:\AutomationReinvented\testng \lib\*;C:\AutomationReinvented\testng\bin” org.testng.TestNG testng.xml

Check questions from 1 to 10 below:

Question set 11 to 20:
Qus Set - 11 to 20

Question set 21 to 30:
 
Check below link for question SET-01:
Top API Interview Question 1-10
 
Check below link for question SET-02:
Top API Interview Question 11-20  
For Online Training on SDET contact 9619094122, starting new batch from November First week. 
 

*************************************************

API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API

 
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes

 
Docker Interview Question Set
https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html

 
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux

 
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign


Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java


GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT


Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions

Sunday, 4 October 2020

Top 11 kubernetes interview questions for SDET/DevOps SET-02? Kubernetes deployment commands















 



1. How to create deployment in Kubernetes?
kubectl create deployment <Deplyment-Name> --image=<Container-Image>

2. How to get all deployments in K8s?


kubectl get deployments

3. How to describe the deployment?

kubectl describe deployment <deployment-name>

4. How to scale the deployment?


kubectl scale --replicas=10 deployment/<Deployment-Name>

5. How to expose deployment as a service?

kubectl expose deployment <Deployment-Name> --type=NodePort --port=80 --target-port=80 --name=<ServiceName>

6. How to check the deployment status or rollout status?

kubectl rollout status deployment/<Deployment-Name>

Kubernetes interview question SET-01

7. Get the rollout history of deployment?

kubectl rollout history deployment/<Deployment-Name>

8. How to edit the deployment?

kubectl edit deployment/<Deployment-Name> --record=true

Difference between 401 vs 403

9. How to undo the roolout in deployment?

kubectl rollout undo deployment/my-first-deployment

10. How to kill the existing pods and recreate new pods in a rolling fashion?

kubectl rollout restart deployment/<Deployment-Name>

11. How to pause the deployment?

kubectl rollout pause deployment/<Deployment-Name>
12. Commands for kubernetes POD?
Cick Here for answer 

Want to learn more? ...Check below link for more java interview question:
 

Thursday, 17 September 2020

API authentication methods automation with Rest Assured? API automation Interview questions for SDET SET-03

 
 
 
Check below link for question SET-01:
Top API Interview Question 1-10
 
Check below link for question SET-02:

   
    21. How to use Basic authentication in automation?


        Response resp = given()
                .auth()
                .basic("sid", "sid").when().get("https://reqres.in/api/users/2");
                
    22. How to use Pre-emptive authentication in automation?


        Response resp1 = given()
                .auth()
                .preemptive().basic("sid", "sid").when().get("https://reqres.in/api/users/2");
                
    23. How to use digest authentication in automation?


        Response resp2 = given()
                .auth()
                .digest("sid", "sid").when().get("https://reqres.in/api/users/2");
    
    24. How to use Oauth2 authentication in automation?    


        Response resp3 = given()
                .auth()
                .oauth2("").when().get("https://reqres.in/api/users/2");
    
    25. How to use Oauth authentication in automation?  
    
        Response resp4 = given()
                .auth()
                .oauth("consumerKey", "consumerSecret", "accessToken", "secretToken").when().get("https://reqres.in/api/users/2");
                
    26. How to use header for authorization(oauth2) in automation?

        Response resp5 = given().header("Authorization","accessToken")
                    .when().get("https://reqres.in/api/users/2");
                
    }

   27. How to automate GET method using Rest Assured?

Click here for answer 

  28. Difference between status code 401 and 403?

Click here for answer 401 vs 403 

  29. What are main differences between API and Web Service?


    - All Web services are APIs but not all APIs are Web services.


    - Web service uses three styles of use: SOAP, REST and XML-RPC for communication whereas   API  may be exposed in multiple ways.


   -  Web service needs a network to operate but APIs don’t need a network to operate.

 30. What is REST?

- REST (Representational State Transfer) is an architectural style for developing web services which exploit the ubiquity of HTTP protocol and uses HTTP method to define actions. It revolves around resource where every component being a resource that can be accessed through a shared interface using standard HTTP methods.


- In REST architecture, REST Server provides access to resources and client accesses and makes these resources available.

 
- Each resource is identified by URIs or global IDs, and REST uses multiple ways to represent a resource, such as text, JSON, and XML.


Check below link for question SET-01:
Top API Interview Question 1-10
 
Check below link for question SET-02:
Top API Interview Question 11-20

Online training for API manual and automation testing batch will start from September 28th so contact @9619094122 to enroll.Demo for API online training is on 24th 7:30 PM IST

 

*************************************************

API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API

 
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes

 
Docker Interview Question Set
https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html

 
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux

 
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign


Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java


GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT


Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions

Tuesday, 15 September 2020

Difference between API status code 401 and 403?

 


Check below link for question SET-01:
Top API Interview Question 1-10

The 401 (Unauthorized) status code indicates that the request not applied because it lacks valid authentication credentials for the target resource.
The 403 (Forbidden) status code indicates that the server understood the request but refuses to authorize it.


Frequent Cause
The 403 error can occur when a user able to login but don't have sufficient privileges to access the requested resource. For example, a normal user attempting to load an 'admin' route.
The most obvious time for 401 error, is when you have not logged in at all, or provided the incorrect password. If authentication credentials were provided in the request, the server considers them insufficient to  grant access.


Rare cause
403 errors can occur because of restrictions not entirely dependent on the logged in user's credentials.
401 errors can occur even if the user enters the correct credentials. This is rare, and might be something you only really encounter while developing your own authenticated back ends.
But if the authorization header is malformed it will return a 401

API Testing Interview Questions

Conclusion:
401 Unauthorized response should be utilized for missing or bad authentication, and  403 Forbidden response should be used afterwards, when the user is authenticated but isn’t authorized to perform the requested operation on the given resource.

 

Online training for API manual and automation testing batch will start from September 20th so contact @9619094122 to enroll.

 

*************************************************

API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API

 
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes

 
Docker Interview Question Set
https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html

 
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux

 
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign


Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java


GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT


Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions

 

Friday, 4 September 2020

Top 11 Kubernetes interview question and answers for SDET Devops QA SET-01?














Below is the list of Kubernetes interview questions on Pod, more will come in coming days so stay tuned and keep learning. Most asked k8s Interview Questions for DevOps in 2020.

As QA role in DevOps is quite vast so now it seems to be mandatory for Automation testers to learn Docker and Kubernetes. In fact in many interviews they are asking basic K8s commands.


1. How to create a Pod?
kubectl run <desired-pod-name> --image <Container-Image> --generator=run-pod/v1

2. How to get lists of all Pods?

kubectl get pods

3.
How to get list of pods which provide Node information of pods 
on which Pod is running?

kubectl get pods -o wide

4. How to get describe of Pod for troubleshooting?

kubectl describe pod <Pod-Name>

5. How to delete pod in Kubernetes?

kubectl delete pod <Pod-Name>

*What commands of GIT we need to know for DevOps and SDET?
 Click here for Answer

6. How to expose pod as service to access application from internet?

kubectl expose pod <Pod-Name> --type=NodePort --port=80 --name=<Service-Name>

7. How to get service information in Kubernetes?

kubectl get service

8.How to access the Pod logs?

kubectl logs <pod-name>

9. How to connect to a container in Pod and execute commands?

kubectl exec -it <pod-name> -- /bin/bash
ls cd /usr/....... cat test.html exit

# if you want to execute individual commands
kubectl exec -it my-first-pod ls
10. How to get YAML output of Pod and Service?

kubectl get pod my-first-pod -o yaml

11. How to delete a Pod?

kubectl delete pod <Pod name>
12. What are the Docker commands mostly asked in DevOps-SDET-QA interview?
Click for answer 
Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, for both declarative configuration and automation.  
Want to learn more? ...Check below link for more java interview question:
 

*************************************************

API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API

 
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes

 
Docker Interview Question Set
https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html

 
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux

 
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign


Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java


GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT


Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions
 
 

All Time Popular Posts

Most Featured Post

𝗦𝘁𝗶𝗹𝗹 𝘀𝘁𝗿𝘂𝗴𝗴𝗹𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗝𝗮𝘃𝗮 𝗰𝗼𝗱𝗶𝗻𝗴 𝗿𝗼𝘂𝗻𝗱𝘀?

❓ 𝗦𝘁𝗶𝗹𝗹 𝘀𝘁𝗿𝘂𝗴𝗴𝗹𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗝𝗮𝘃𝗮 𝗰𝗼𝗱𝗶𝗻𝗴 𝗿𝗼𝘂𝗻𝗱𝘀? The issue isn’t your logic—it’s the lack of pattern recogniti...