Pages

Monday, 17 May 2021

Top GIT Interview question Set-03 for SDET/Testers/Developers/DevOps?


Pipeline Script Fundamentals

Click Here :   DevOps Related Posts

 Check GIT commands for Interview preparation SET-1:

GIT Interview Question 1 to 11

Check GIT commands for Interview preparation SET-2:

GIT Interview Question 12 to 21

Check GIT commands for Interview preparation SET-3:

GIT Interview Question 21 to 30

Check GIT commands for Interview preparation SET-4:

GIT Interview Question 31 to 40

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Below is the third set of GIT interview questions for SDET, DevOps and Automation Testing profile.

  •  How to Switch to previous branch:

      Ans: git switch @{-1}


  • How to create repository in bitbucket and push code for automation project?

       Ans: Click Here For The Steps

  • How to Push a local branch for the first time:

     Ans: git push --set-upstream origin <branch>



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

 How to integrate Maven project with Jenkins?

Maven & Jenkins Integration
*********************************************************

  • How to Push a local branch to a different remote branch:

      Ans: git push origin <local_branch>:<remote_branch>

  • How to undo commits?

       Ans: Click Here For Answer

  • Fetch changes from both origin and upstream in the same shot:

      Ans: git fetch --multiple origin upstream


Refer Below Link for Docker Commands in SDET:

Click Here for DOCKER COMMANDS


  • How to Delete a remote branch on origin:


     Ans: git push origin :<remote_branch>


  • Difference between rebase and merge?


    Ans: Click Here For Answer

  • Unstash those changes and bring them back into your working directory:

     Ans: git stash pop


How to create Docker Image from scratch?

  • Difference between soft, mixed, and hard resets?

    Ans: 
    Click Here For Answer

  • Listing the existing tags in Git is straightforward

    Ans: $ git tag
  • How to create tag?

    Ans: git tag <tagname>


  • Command to delete the file from your working directory and stages the deletion?

    Ansgit rm [fileName]



  • Unstash your changes without popping them off the stack.

    Ans: git stash apply

  • Check GIT commands for Interview preparation SET-1:
    GIT Interview Question 1 to 11
  • Check GIT commands for Interview preparation SET-2:
    GIT Interview Question 12 to 21

  • What does cherry-picking a commit with GIT means?

    Ans:  Let's Consider the following scenario. You have two branches.

    a) release2 - This branch is going to your customer, but there are still some bugs to be fixed.

    b) master - Classic master branch, where you can for example add functionality for release2.

    NOW: You fix something in release2. Of course you need this fix also in master. And that is a typical use-case for cherry picking. So cherry pick in this scenario means that you take a commit from release2 branch and include it into the master branch.


  • Difference between rebase and merge?

  •     AnsClick Here For Answer

    Learn (API-Microservice)Testing+(CoreJava+UI)-SDET with Self Paced Videos and one LIVE Doubt Session
    TRANING VIDEOS AVAILABLE with Live Doubt Session @4500/-(course-1 below,API TRaining Videos With ClassNotes and Coding Set) and 6500/- (API+UI, both course-1 & 2 below) Check Training Page for Course Content or reach out @whatsapp +91-9619094122



  • Entire course content can be found below:  COURSE CONTENT

Suggested Post:

ALL ABOUT AUTOMATION FRAMEWORK DESIGN

Java Interview question Set-1:

SET-01 1-10

Java Interview question Set-2:

SET-02 10-20

Java Interview question Set-3:

SET-03 21-30

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

SeleniumWebdriver Automation Testing Interview Questions:

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

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, 16 May 2021

Resume format for API Testing Profile?

 

Check below link for question and answers with code:

Top API Interview Question 1-10

 

1. API Testing with Postman

2. Familiar with methods like GET,POST,PUT,PATCH,DELETE

3. Well versed with Microservices/Webservices architecture

4. Performed Functional and Integration Testing with API

5. API Automation with Rest Assured.

6. Working expertise in Dependency management tools like Maven, Gradle

7. Participate in the Framework Designing process

8. Working knowledge in TestNG and automation suite.

9. Source code management with GIT

10. CI-CD with Jenkins to auto trigger automation suite.

11. Initiated Extent report in project.

12. Managing Automation suites and Jenkins Jobs Integration.

13. Working knowledge in Automation Test Plan, Test Estimation and Test Metrics.

14. Guide the team to design test script and creating API test scenarios.

15. Working knowledge in Core Java for Automation.(add your own language preference)

How to integrate Maven project with Jenkins?

Maven & Jenkins Integration

 How to install JDK and set Java Home path in Windows and MacOs ?

Click here for Steps


Java Interview question Set-1:
SET-01 1-10

Java Interview question Set-2:

SET-02 10-20

Java Interview question Set-3:

SET-03 21-30


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

SeleniumWebdriver Automation Testing Interview Questions:

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, 10 May 2021

How to schedule a job in Jenkins pipeline? How to run automation suite everyday with auto trigger scheduler?


1. What is Jenkins?

As defined in Jenkins docs, "Jenkins is a self-contained, open source automation server that can be used to automate all sorts of tasks related to building, testing, and delivering or deploying software."

We use it to create jobs or tasks which will help us to achieve CI and CD in our project.

The best thing :  it is "FREE"

What to Use Jenkins for and When to Use It

Use Jenkins to automate your development workflow so you can focus on the work that matters most. Jenkins is commonly used for:

  • Building projects
  • Run tests to detect bugs and other issues as soon as they are introduced
  • Static code analysis
  • Deployment

Execute repetitive tasks, save time, and optimize your development process with Jenkins.


Pre-requisite:


  • Why we need to schedule Jenkins job for automation test suite?

here are some reasons why we need Jenkins job scheduling for automation test suites:

  1. Automating repetitive tasks: Jenkins job scheduling helps automate the execution of repetitive test suites at regular intervals, ensuring that test cases are executed consistently and reducing the time and effort required to execute them manually.

  2. Early detection of issues: Scheduling tests to run at regular intervals or specific times can help detect issues or bugs early in the development process, enabling teams to address them before they become major problems.

  3. Efficient resource utilization: Jenkins allows for parallel test execution, enabling multiple tests to run simultaneously on different machines or environments, making efficient use of available resources and reducing overall test execution time.

  4. Integration with other tools: Jenkins can be integrated with other tools like JIRA, Git, and Selenium, allowing for seamless automation of test cases and providing real-time feedback to developers on the status of tests.

  5. Customization: Jenkins job scheduling provides flexibility in scheduling tests based on various factors such as environment, code changes, and other triggers, enabling teams to customize their test automation workflows based on their specific needs and requirements.

Overall, Jenkins job scheduling is an essential component of test automation that helps improve efficiency, reliability, and scalability of test automation workflows.


The steps for schedule jobs at Jenkins:


First, let’s look at the Jenkins job scheduling configuration. It looks a lot like Linux’s cron syntax. 

  1. Click on the "Configure" option for the job.
  2. scroll down to "Build Triggers" .
  3. Click on the "Build Periodically" CheckBox.
  4. Add scheduled time in the Schedule field:: This will take cron expression as below:



  1. MINUTES Minutes in one hour (0-59)
  2. HOURS Hours in one day (0-23)
  3. DAYMONTH Day in a month (1-31)
  4. MONTH Month in a year (1-12)
  5. DAYWEEK Day of the week (0-7) where 0 and 7 are sunday

 How to integrate Maven project with Jenkins?

Maven & Jenkins Integration

  • So we need to input value for 5 *, and each * represents one parameter in the sequence as mentioned above.
  • If I want to run my job daily at 11 pm then the expression will be:    0 23 * * *
IMAGE REFERENCE:




  • If we want to run the job 23:45 (11:45 PM) every Saturday: 45 23 * * 6


  • To schedule every hour, then you can put: 0 * * * *

Then your job will be executed every hour (07:00, 08:00, 09:00 and so on)

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

  • Each line of a crontab file represents a job, and looks like this:

# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday;
# │ │ │ │ │                                   7 is also Sunday on some systems)
# │ │ │ │ │
# │ │ │ │ │
# * * * * * <command to execute>


Non-standard predefined scheduling definitions

Some cron implementations[9] support the following non-standard macros:

EntryDescriptionEquivalent to
@yearly (or @annually)Run once a year at midnight of 1 January0 0 1 1 *
@monthlyRun once a month at midnight of the first day of the month0 0 1 * *
@weeklyRun once a week at midnight on Sunday morning0 0 * * 0
@daily (or @midnight)Run once a day at midnight0 0 * * *
@hourlyRun once an hour at the beginning of the hour0 * * * *
@rebootRun at startupN/A

How to create parameterized job in Jenkins? VERY IMP

Jenkins builds periodically - multiple schedules


You can apply even more than one schedule for a Jenkins job.


For example, you might have a regular schedule to build Jenkins periodically, let’s say we want to build periodically every work day’s like this 


30 8 * * 1-5

Let’s assume we need to build Jenkins periodically every week before the weekend starts. 


30 16 * * 5

Now we can easily combine these two Jenkins schedules


30 8 * * 1-5 
30 16 * * 5

Jenkins will build every work day at 8:30am and every week on Friday at 4:30pm


Jenkins Build Periodically - two Jenkins schedules


Once you are done with setting up nightly job, do trigger email notification for the build logs and execution report

TRIGGER EMAIL NOTIFICATION WITH JENKINS

Learn (API-Microservice)Testing+(CoreJava+UI)-SDET with Self Paced Videos and one LIVE Doubt Session

TRANING VIDEOS AVAILABLE with Live Doubt Session @4500/-(course-1 below,API TRaining Videos With ClassNotes and Coding Set) and 6500/- (API+UI, both course-1 & 2 below) Check Training Page for Course Content or reach out @whatsapp +91-9619094122

Entire course content can be found below:  COURSE CONTENT
Suggested Post:

ALL ABOUT AUTOMATION FRAMEWORK DESIGN

Java Interview question Set-1:

SET-01 1-10

Java Interview question Set-2:

SET-02 10-20

Java Interview question Set-3:

SET-03 21-30

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

SeleniumWebdriver Automation Testing Interview Questions:

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