Thursday 16 September 2021

Top 10 Jenkins Interview Question for SDET - DevOps - Automation QA?

 



How to send email notification with groovy script in Jenkins pipeline?

Pipeline Script Fundamentals

Click Here :   DevOps Related Posts


1. What is Jenkins?

According to definition in Jenkins docs: "Jenkins is a self-contained, open source automation server which 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 FREE FREE :)

2.  How to install Jenkins?

ANS: Click Here For Steps (with screenshots)

3. Can you write a pipeline script having steps called in stage?

    agent any
        stages {
            stage ('Build') {
                steps {
                    echo
                    'Running build phase. '
                }
            }
        }
    }

4. What is Pipeline, Node and Stage in Jenkins?

ANS: Click Here for All Pipeline Concepts and Terminology

5. Can you write a pipeline script haveing multiple stages in it?

agent any
    stages {
        stage ('Build') {
        }
        stage ('Test') {
        
        }
        stage ('Deploy') {
        
        }
     

    }   

6. How to send email notification in Jenkins using groovy script? VERY IMP

ANS: Click Here For Answer with Groovy Script Steps


7. Can you write a pipeline script where you can call your Maven with automation suite?

node {
stage ('SCM checkout'){
git "https://gitlab.com/mbabilo/experitest"
}
stage ('Build'){
dir("comtest") {
sh "mvn clean install"
}
dir("comtest/target") {
sh "java -jar com.test-1.0-SNAPSHOT.jar"
}
}
}

8. How to schedule a job in Jenkins? How to set nightly Automation Job?

ANS:  Click Here For Schedule Job


9. How to create a pipeline script in Jenkins UI?

Step 1: We create a New Project for the Pipeline by navigating to Jenkins and then click on New Item.



Step 2: Next, we select Pipeline from the given list of options.


Step 3: Then, we will scroll down to Advanced Project Options and paste the pipeline script code that we saw above into the code pane and hit the Save button.



Step 4: We need to set up a test build, which can be quickly done by the Jenkins UI by clicking Build Now.



Step 5: We can see a new build generating under the build history as we click on Build Now. The console logs output can be viewed by clicking on the Build.

10. How to create parameterized job in Jenkins? VERY IMP

  • Interview questions for SDET/Automation Testing:
  • Top 21 GIT interview questions
  • Top 30 Selenium Webdriver Interview Q&A 
  • Top 20 API Testing Interview Q&ASelenium Interview Question SET-4 
  • Selenium Interview Question SET-1
  • Selenium Interview Question SET-2
  • Selenium Interview Questions SET-3
  • Selenium Interview Question SET-4
  •   
           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


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

    SeleniumWebdriver Automation Testing Interview Questions:

     
    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


    Saturday 4 September 2021

    Top 40 GIT Interview Questions and Answers for SDET - DevOps - Automation QA? Useful GIT commands to refer for daily DevOps Tasks?

     



    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


    What is GIT merge conflicts?

    Merging and conflict are a common part of the Git experience. Conflicts in other version control tools like SVN can be costly and time-consuming. Git makes merging super easy. Most of the time, Git will figure out how to automatically integrate new changes.

    Conflicts generally arise when two people have changed the same lines in a file, or if one developer deleted a file while another developer was modifying it. In these cases, Git cannot automatically determine what is correct. Conflicts only affect the developer conducting the merge, the rest of the team is unaware of the conflict. Git will mark the file as being conflicted and halt the merging process. It is then the developers' responsibility to resolve the conflict.

    31. What is the use of Cherrypick in GIT?

    It is used to apply one or more commit from one branch into your working branch or we can say Cherry picking is the act of picking a commit from a branch and applying it to another.

    git cherry-pick <commit> <commit>


     How to integrate Maven project with Jenkins?

    ANS: Maven & Jenkins Integration

    32. How do I rename a branch in GIT while working on it?


    You can use the below command for renaming of the branch:

    git branch -m <new name>

    Click Here :   DevOps Related Posts



    33. If we want to rename the branch from outside the branch, then how can we do it?



    git branch -m <old name> <new name>


    34. Difference between soft, mixed, and hard resets?


    Ans: Click Here For Answer


    35. How do I create a new branch and apply Stash to it?


    git stash branch <branch name> <stash_id>


    36. The difference between rebase and merge?



        Ans: Click Here For Answer


    37. How to view the contents of a Stash?



    Ans: git stash show -p <stash_id>


    38. How to undo commits?



    Ans
    : Click Here For Answer


    39. How to track the remote branches in GIT?

    Assuming there is a remote repository that you cloned your local repository from and also assuming that there is a branch named 'remote_branch' on that remote repository, here is how to track it locally:

    # list remote branches
    git branch -r
    
    # start tracking one remote branch
    git branch --track remote_branch origin/remote_branch
    
    
    40.How to create repository in bitbucket and push code for automation project?
    
    Ans: Click Here For The Steps
    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


    How to Delete a remote branch on origin:


         Ans: git push origin :<remote_branch>

    Difference between rebase and merge?


        Ans: Click Here For Answer


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

    TRAINING 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


    How to identify merge conflict

    As we have experienced from the preceding example, Git will produce some descriptive output, letting us know that a CONFLICT has occured. We can gain further insight by running the git status command


    The output from git status indicates that there are unmerged paths due to a conflict. The merge.text file now appears in a modified state. Let's examine the file and see whats modified.





    Here we have used the cat command to put out the contents of the merge.txt file. We can see some strange new additions

    • <<<<<<< HEAD
    • =======
    • >>>>>>> new_branch_to_merge_later

    Think of these new lines as "conflict dividers". The ======= line is the "center" of the conflict. All the content between the center and the <<<<<<< HEAD line is content that exists in the current branch main which the HEAD ref is pointing to. Alternatively all content between the center and >>>>>>> new_branch_to_merge_later is content that is present in our merging branch.

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

    SeleniumWebdriver Automation Testing Interview Questions:

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

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

     

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


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

    SeleniumWebdriver Automation Testing Interview Questions:

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

     
    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

    API Status Codes with examples for QA-Testers

      🔺 LinkedIn: https://www.linkedin.com/in/sidharth-shukla-77b53145/ 🔺 Telegram Group:  https://t.me/+FTf_NPb--GQ2ODhl 🏮In API testing, it...