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


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

✍️AUTHOR: LinkedIn 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

Friday, 20 December 2019

Top 15 Interview questions on Maven for Automation Testing/SDET/Lead QA in 2023?



SDET Interview Questions and Answers.  

Jenkins Interview Questions and Answers. 

Appium Interview Questions and Answers

Selenium Interview Questions and answers. 

GIT Interview Questions and Answers


MAVEN:


At first glance Maven can appear to be many things, but in a nutshell Maven is an attempt to apply patterns to a project's build infrastructure in order to promote comprehension and productivity by providing a clear path in the use of best practices. Maven is essentially a project management and comprehension tool and as such provides a way to help with managing:

  • Builds
  • Documentation
  • Reporting
  • Dependencies
  • SCMs
  • Releases
  • Distribution

Pipeline Script Fundamentals

Click Here:   DevOps Related Posts




  1. How does Maven manage dependencies and transitive dependencies? Ans: Maven manages dependencies and transitive dependencies through the use of a Project Object Model (POM) file. This file contains information about the project, including a list of dependencies and their versions. When a project depends on another project, Maven will automatically include that project's dependencies (transitive dependencies) in the final build, eliminating the need for manual management of these dependencies. Maven uses a repository to store these dependencies, and it will automatically download them from the repository when they are needed. Additionally, Maven uses a dependency hierarchy to resolve conflicts between different versions of the same dependency, using the "nearest definition" strategy.
  2. How to install Maven on Linux machine? Ans: Click Here for Answer with code & Screenshots
  3. What is a SNAPSHOT version?
     Ans: 

Notice the value of the version tag in the pom.xml file shown below has the suffix: -SNAPSHOT.
  1. <project xmlns="http://maven.apache.org/POM/4.0.0"
  2. ...
  3. <groupId>...</groupId>
  4. <artifactId>my-app</artifactId>
  5. ...
  6. <version>1.0-SNAPSHOT</version>
  7. <name>Maven Quick Start Archetype</name>
  8. ...

The SNAPSHOT value refers to the 'latest' code along with a development branch, and provides no guarantee the code is stable or unchanged. Conversely, the code in a 'release' version (any version value without the suffix SNAPSHOT) is unchanging.

In other words, a SNAPSHOT version is the 'development' version before the final 'release' version. The SNAPSHOT is "older" than its release.

During the release process, a version of x.y-SNAPSHOT changes to x.y. 

The release process also increments the development version to x.(y+1)-SNAPSHOT. For example, version 1.0-SNAPSHOT is released as version 1.0, and the new development version is version 1.1-SNAPSHOT.

How do I send email notifications with groovy script in Jenkins pipeline?



3.What is the purpose of mvn clean command?

     Ans:    This command removes the target directory before the starting of a build process.

4. How to integrate Maven pom.xml with Jenkins job?


5. List out the dependency scope in Maven?

      The various dependency scopes used in Maven are:

        • Compile: It is the default scope, and it indicates what dependency is available in the classpath of the project
       • Provided: It indicates that the dependency is provided by JDK or web server or container at runtime
       • Runtime: This says that the dependency is not needed for compilation but is required during   execution
       • Test: It says dependency is available only for the test compilation and execution phases
       • System: It indicates you have to provide the system path
       • Import: This indicates that the identified or specified POM should be replaced with the dependencies in that POM’s section


6.  In Maven, what are the two settings files called and what are their locations?

In Maven, the settings files are called settings.xml, and the two settings files are located at

• Maven installation directory: $M2_Home/conf/settings.xml
• User’s home directory: ${ user.home }/ .m2 / settings.xml

7. Maven dependencies with pom.xml for Automation Framework design? How to add selenium, testng,cucumber dependency in Maven?

Click Here For POM.xml

This has the entire list dependencies required to design a Selenium Automation Framework from scratch.


Both plugins and dependencies are Jar files.

But the difference between them is, most of the work in maven is done using plugins; whereas dependency is just a Jar file which will be added to the classpath while executing the tasks.

So, we can say, plugin is a Jar file which executes the task, and dependency is a Jar which provides the class files to execute the task.

9. Group id vs artifact id

         groupId will identify your project uniquely across all projects, so we need to enforce a naming schema. You have to follow the package name rules, which means that it has to be at least as a domain name you control, and you can create as many subgroups as you want.
eg. org.apache.maven, org.apache.commons

         artifactId is the name of the jar without version. If you created it then you can choose whatever name you want with lowercase letters and no strange symbols. If it's a third party jar you have to take the name of the jar as it's distributed.
eg. maven, commons-math


10. What is the default location for your local repository?
        
Answer: ~ / M2 / repository.


11. Maven plugins?

         1. surefire plugin
         2. compiler plugin
         3. resource plugin

12. What is the default scope that the maven uses if we do not specify the scope element in pom.xml?

Answer: Compile

How do I create documentation?

To get you jump started with Maven's documentation system you can use the archetype mechanism to generate a site for your existing project using the following command:

mvn archetype:generate \
  -DarchetypeGroupId=org.apache.maven.archetypes \
  -DarchetypeArtifactId=maven-archetype-site \
  -DgroupId=com.mycompany.app \
  -DartifactId=my-app-site

13. What scope can be used to make certain dependencies available only while compiling and running tests?
         
Answer: Test


14. What is archetype?

Answer: We will use maven archetype to generate the maven folder structure based on the   inputs.
        
Ex: mvn archetype:generate.

TOP INTERVIEW QUESTIONS

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

TOP 15 BDD - CUCUMBER Interview Q&A


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

✍️AUTHOR: LinkedIn 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, and Java Coding question sets 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


All Time Popular Posts

Most Featured Post

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

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