Pages

Monday, 24 February 2020

Top 11 SQL/Sybase/Oracle query for SDET/Developers/Automation Testing SET 01?

SQL


 As SQL is quite vast so I will post interview questions on SQL query in three sets, below is the set-10:

1.     Write An SQL Query To Print Details Of The EMPLOYEEs Whose FIRST_NAME Ends With ‘A’.

Select * from EMPLOYEE where FIRST_NAME like '%a';
2.     Write An SQL Query To Print Details Of The EMPLOYEEs Whose FIRST_NAME Ends With ‘H’ And Contains Six Alphabets.

Select * from EMPLOYEE where FIRST_NAME like '_____h';
3.     Write An SQL Query To Print Details Of The EMPLOYEEs Whose SALARY Lies Between 100000 And 500000.

Select * from EMPLOYEE where SALARY between 100000 and 500000;
4.     Write An SQL Query To Print Details Of The EMPLOYEEs Who Have Joined In Feb’2014.

Select * from EMPLOYEE where year(JOINING_DATE) = 2014 and month(JOINING_DATE) = 2

5.     Write An SQL Query To Fetch EMPLOYEE Names With Salaries >= 50000 And <= 100000.

Select FIRST_NAME, SALARY from EMPLOYEE where SALARY between 50000 And  100000.

6.     Write An SQL Query To Fetch The No. Of EMPLOYEEs For Each Department In The Descending Order.


SELECT DEPARTMENT, count(EMPLOYEE_ID) No_Of_EMPLOYEEs
FROM EMPLOYEE
GROUP BY DEPARTMENT
ORDER BY No_Of_EMPLOYEEs DESC;

7.     Write An SQL Query To Print Details Of The EMPLOYEEs Who Are Also Managers.

SELECT EMPLOYEE.EMPLOYEE_ID,EMPLOYEE.DEPARTMENT,EMPLOYEE.FIRST_NAME ,Title.EMPLOYEE_TITLE Title from EMPLOYEE Inner Join Title
on EMPLOYEE.EMPLOYEE_ID=Title.EMPLOYEE_Ref_ID  where Title.EMPLOYEE_TITLE='Manager' order by EMPLOYEE_ID


8.    Write An SQL Query To Fetch Duplicate Records Having Matching Data In Some Fields Of A Table.

SELECT EMPLOYEE_TITLE, AFFECTED_FROM, COUNT(*)
FROM Title
GROUP BY EMPLOYEE_TITLE, AFFECTED_FROM
HAVING COUNT(*) > 1;


9.    Write An SQL Query To Show Only Odd Rows From A Table.

SELECT * FROM Emplyee WHERE MOD (EMPLOYEE_ID, 2) <> 0;
10.  Write An SQL Query To Show Only Even Rows From A Table.

SELECT * FROM EMPLOYEE WHERE MOD (EMPLOYEE_ID, 2) = 0;

      11. Write An SQL Query To Determine The Nth (Say N=5) Highest Salary From A Table.

      SELECT Salary FROM EMPLOYEE ORDER BY Salary DESC LIMIT n-1,1;




Lean Cucumber/BDD commands in below link:

CUCUMBER COMMANDS 
 

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

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

Monday, 17 February 2020

Top 17 interview questions on Cucumber/BDD/SDET/Automation Testing/Lead QA?


Check questions from 1 to 10 below:

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

  • Scenario outline:

 The Scenario Outline keyword can be used to run the same Scenario multiple times, with different combinations of values.
  • Background: 
Sometimes you’ll find yourself repeating the same Given steps in all of the scenarios in a feature.
Since it is repeated in every scenario, this is an indication that those steps are not essential to describe the scenarios. You can literally move such Given steps to the background, by grouping them under a Background section.

  • Monochrome

Display console output in readable way

  • Glue

it helps Cucumber to locate theStep Definition file.Whenever Cucumber encounters a Step, it looks for a Step Definition inside all the files present in the folder mentioned in Glue Option.
  • Feature: 
The purpose of the Feature keyword is to provide a high-level description of a software feature, and to group related scenarios.The first primary keyword in a Gherkin document must always be Feature, followed by a : and a short text that describes the feature.
  • plugin:

 plugin Option is used to specify different formatting options for the output reports.

  • Format

It will define the format of the reports. Options are pretty,html,json,junit.
Note – Format option is deprecated . Use Plugin in place of that.
  • RunWith:

This is a JUnit annotation that specifies which runner it has to use to execute this class

  • CucumberOptions

This annotation provides some important information which will be used to run your cucumber feature file.

  •  Given

It is for pre condition

  •     When
Test action that will get executed

  •     Then

It defines the expected result.
  •     Add
Add conditions to step
  •     But:

 It is used to add negative type comments
  •     Strict:
with true as opted value, It will fail execution if any undefined or pending steps found.
  
  •     dryRun: Check if all steps have step definition
  •     tag:

    The tags can be used when specifying what tests to run through any of the running mechanism.
    @RunWith(Cucumber.class)
    @CucumberOptions(
                  features = “src/test/“,
                  tags ={“@Web“},...  )
    Cucumber can exclude scenarios with a particular tag by inserting the tilde character before the tag.
    For the following command will run all Scenarios without the UI tag.
    @RunWith(Cucumber.class)
    @CucumberOptions(
                  features = “src/test/features“,
                  tags ={“~@UI“},...  )



Want to learn more ! Below is the best interview question for Docker:

Monday, 10 February 2020

Top 18 Docker commands for Automation Tester/Devops/SDET/Test Lead?


Check post for MAVEN commands and Interview Question:
MAVEN Commands

Docker Commands:Interview Question



Docker is an open-source platform that allows developers to create, deploy, and run applications in containers. Containers are lightweight, standalone, and executable packages that contain everything needed to run an application, including code, libraries, and system tools.

There are several reasons why Docker is useful for software testing:

  1. Consistent Environments: Docker provides a way to create and run applications in a consistent environment, which means that you can test your application in the same environment as the one it will be deployed in.

  2. Isolation: Docker containers are isolated from each other and from the host system, which means that you can test your application without worrying about interfering with other applications or the host system.

  3. Reproducibility: Docker allows you to create reproducible environments, which means that you can easily recreate a specific environment to reproduce a bug or to test a new feature.

  4. Scalability: Docker makes it easy to scale your testing infrastructure up or down, depending on your needs. You can easily spin up new containers to test different parts of your application, or to test your application on different platforms.

  5. Cost savings: Docker allows you to test your application on a smaller infrastructure footprint than traditional virtualization, which can save costs on hardware, maintenance, and energy.

Overall, Docker makes it easy to test your application in a controlled, consistent, and reproducible environment, which can help you find and fix bugs faster and ensure that your application works as intended in production.



1. docker --version -> To check Docker Version.

2. docker pull <Image-Name> -> To download Docker Image from Docker Hub.Pull an image or a repository from a registry

3. docker ps -> To check how many Containers are Up and Running.

4. docker ps –a -> To check how many Containers are Available, Up and Running.
 
************************************************ 
 
 
************************************************ 

5. docker run -it -d <Image-Name> -> To Create Docker Container from Docker Image.

6. docker start <Container-Id> -> To Start Container.

7. docker restart <Container-Id> -> To Restart Container.

8. docker stop <Container-Id> -> To Stop Container when in Running.

9. docker rm <Container-Id> -> To Delete Docker Container.

10. What are the commands for Dockerfile?

Ans: Dockerfile is a very important section, check the link HERE for all commands related to Dockerfile.


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

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


10. docker rmi <Image-Id> -> To Delete Docker Image.

11. docker images -> To check for Available Docker Images in System.

12. docker exec –it <Container Id> bash -> To Get into Container and take Control on it.

13. exit -> To Come Out from Container to Docker.

14. docker kill <Container Id> -> To Stop Container Forcefully.
 
************************************************
************************************************ 

15. docker inspect <Container Id> -> It will give complete information about Container.

16. docker image prune –a -> It will delete images which doesn’t have even a Single Container.

17. docker run --rm <Image-Name> -> Create a docker container and auto remove on exit

18. How to setup docker with selenium grid for cross browser testing?



19. docker system prune -a  : it will delete all the images, containers and networks which are not used to be active anymore.

*******************************************************************
For any doubts or career guidance, reach out to me 


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





Do remember that knowing Linux is one of the most important aspect to work as an SDET.

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

TOP 15 BDD - CUCUMBER Interview Q&A


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

✍️AUTHORLinkedIn Profile

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

Learn (API-Microservice)Testing+ Selenium UI Automation-SDET with Self Paced Videos prepared by FAANG employees and LIVE Doubt Session 

SDET TRANING VIDEOS AVAILABLE with Live Doubt Session(course-1 below,API TRaining Videos With Class Notes and Coding Set) and (API+UI, both course-1 & 2 below) Check Training Page for Course Content or reach out @whatsapp +91-9619094122. 
This includes classnotes, 300+ interview questions, 3 projects, Java Coding question set for product companies along with career guidance from FAANG employees for Automation and SDET.

For more details whatsapp : https://lnkd.in/dnBWDM33

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

SeleniumWebdriver Automation Testing Interview Questions:

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

API Testing Interview Question Set:

https://automationreinvented.blogspot.com/2022/03/top-80-api-testing-interview-questions.html

DevOps Interview Q&A:

https://automationreinvented.blogspot.com/2021/11/top-11-devops-interview-questions-and.html 

Kubernetes Interview Question Set

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

Docker Interview Question Set

https://automationreinvented.blogspot.com/Docker

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/2021/09/top-40-git-interview-questions-and.html

Coding Interview Question Set:

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

Mobile Testing Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Mobile%20Testing

Python Interview Question Set for QAE - SDET - SDE:

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