Pages

Saturday, 26 June 2021

Basic Linux Commands Set for QA and SDET 2023? Linux commands for Manual Testers, DevOps?




"Linux FUN FACTS"100% of the world’s 500 fastest supercomputers run Linux.

Let's learn Linux commands for SDET/QA/DevOps profile, do check previous posts with 40+ Linux commands and make your own cheat sheet with the entire list.
Happy Learning!

  Linux Commands Set-01 for SDET/DevOps INterview Questions

  Linux Commands Set-02 for SDET/DevOps

Linux Commands set-03 for SDET/DevOps Interview Questions


  • How to search first line of file file3.txt

head -n 1 file3.txt

  • How to search last 3 line of file file3.txt

tail -n 3 file3.txt

  • HOW TO GET ALL THE LINES IN THE FILE “file3.TXT” which CONTAINS Test?

grep Test file3.txt

  • HOW TO GET ALL THE LINES IN THE FILE “file3.TXT” which has the word Test?

grep -w Test file3.txt

  • HOW TO GET ALL THE LINE number IN THE FILE “file3.TXT” which has the word Test?

grep -w -n Test file3.txt


Top 21 GIT interview questions: Click Here


  • How to provide CHMOD?

It is used to change read, write and execute permission 


0: no permission

1: execute

2: write

3: write and execute

4: read

5: read and execute

6: read and write

7: read, write and execute



  • What is top command ?

It is same as Task Manager in windows machine. The output will look like below


  • rmdir command vs rm command?
The rm command is used to delete directories and the contents within them but rmdir only allows you to delete empty directories.
  •  What is the use of traceroute in Linux?
Click Here For Answer
  • How to edit a file in Linux?
Use vi editor, for example let we want to edit file with name as file3.txt then we can use below steps:

-   vi files3.txt

- Use “i” to insert inside editor

- Press esc to come out of editor mode and then use :wq

- :wq : save the file and quit

Infact you can use :q or :w for below-->

:w :save the file

:q quit without saving


Tips: K j h l to move cursor inside vi editor (up/down/left/right)


Know About DevOps-Click Here

  •  How to create a file with name as file3.txt?

touch file3.txt or cat > file3.txt


  • What is the use of PWD command?

Use the pwd command to find out the path of the current working directory,  it  will return an absolute  path like :/Users/Sishukla




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

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








Saturday, 19 June 2021

How to install Docker desktop in Windows and Mac?



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

Pipeline Script Fundamentals

Click Here :   DevOps Related Posts

Refer Below Link for Docker Commands used in the set up:

DOCKER Commands

1. Windows INstallation:

Download Docker for windows from below link:
https://desktop.docker.com/win/stable/amd64/Docker%20Desktop%20Installer.exe

Install Docker Desktop on Windows

  1. Double-click Docker Desktop Installer.exe to run the installer.

    If you haven’t already downloaded the installer (Docker Desktop Installer.exe), you can get it from Docker Hub. It typically downloads to your Downloads folder, or you can run it from the recent downloads bar at the bottom of your web browser.

  2. When prompted, ensure the Enable Hyper-V Windows Features or the Install required Windows components for WSL 2 option is selected on the Configuration page.

  3. Follow the instructions on the installation wizard to authorize the installer and proceed with the install.

  4. When the installation is successful, click Close to complete the installation process.

  5. If your admin account is different to your user account, you must add the user to the docker-users group. Run Computer Management as an administrator and navigate to Local Users and Groups > Groups > docker-users. Right-click to add the user to the group. Log out and log back in for the changes to take effect.

Start Docker Desktop

Docker Desktop does not start automatically after installation. To start Docker Desktop, search for Docker, and select Docker Desktop in the search results.

search for Docker app

When the whale icon in the status bar stays steady, Docker Desktop is up-and-running, and is accessible from any terminal window.

whale on taskbar

If the whale icon is hidden in the Notifications area, click the up arrow on the taskbar to show it. To learn more, see Docker Settings.

When the initialization is complete, Docker Desktop launches the onboarding tutorial. The tutorial includes a simple exercise to build an example Docker image, run it as a container, push and save the image to Docker Hub.

Docker Quick Start tutorial

Congratulations! You are now successfully running Docker Desktop on Windows.

If you would like to rerun the tutorial, go to the Docker Desktop menu and select Learn.


2. MAC Installation:

Download docker desktop for mac from below link(Mac with intel chip):
https://desktop.docker.com/mac/stable/amd64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-mac-amd64


Install and run Docker Desktop on Mac

  1. Double-click Docker.dmg to open the installer, then drag the Docker icon to the Applications folder.

    Install Docker app

  2. Double-click Docker.app in the Applications folder to start Docker. (In the example below, the Applications folder is in “grid” view mode.)

    Docker app in Hockeyapp

    The Docker menu in the top status bar indicates that Docker Desktop is running, and accessible from a terminal.

    Whale in menu bar

    If you’ve just installed the app, Docker Desktop launches the onboarding tutorial. The tutorial includes a simple exercise to build an example Docker image, run it as a container, push and save the image to Docker Hub.

    Docker Quick Start tutorial

  3. Click the Docker menu (whale menu) to see Preferences and other options.

  4. Select About Docker to verify that you have the latest version.

Congratulations! You are now successfully running Docker Desktop.

If you would like to rerun the tutorial, go to the Docker Desktop menu and select Learn.

Run below commands : DOCKER Commands


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


Saturday, 12 June 2021

How to install Jenkins with Windows MSI Installer?




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

Pipeline Script Fundamentals

Click Here :   DevOps Related Posts


Point:1

Download jenkins from this link:
https://www.jenkins.io/download/#downloading-jenkins


Point:2

  • Installation steps using Windows MSI installer

Refer to the step:1 page to download either an LTS release or a weekly release of the Windows installer. After the download completes, open the Windows installer and follow the steps below to install Jenkins.

Step 1: Setup wizard

On opening the Windows Installer, an Installation Setup Wizard appears, Click Next on the Setup Wizard to start your installation.

Windows Installation Setup Wizard

: Click Here :   DevOps Related Posts

Step 2: Select destination folder

Select the destination folder to store your Jenkins Installation and click Next to continue.

Jenkins Installation Destination


Step 3: Service logon credentials

When Installing Jenkins, it is recommended to install and run Jenkins as an independent windows service using a local or domain user as it is much safer than running Jenkins using LocalSystem(Windows equivalent of root) which will grant Jenkins full access to your machine and services.

To run Jenkins service using a local or domain user, specify the domain user name and password with which you want to run Jenkins, click on Test Credentials to test your domain credentials and click on Next.

Jenkins Service Logon Credentials

If you get Invalid Logon Error pop-up while trying to test your credentials, follow the steps explained here to resolve it.


Step 4: Port selection

Specify the port on which Jenkins will be running, Test Port button to validate whether the specified port if free on your machine or not. Consequently, if the port is free, it will show a green tick mark as shown below, then click on Next.

Jenkins Select Port



Step 5: Select Java home directory

The installation process checks for Java on your machine and prefills the dialog with the Java home directory. If the needed Java version is not installed on your machine, you will be prompted to install it.

Once your Java home directory has been selected, click on Next to continue.

Select Java Home Directory


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

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

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

Step 6: Custom setup

Select other services that need to be installed with Jenkins and click on Next.

Jenkins Custom Setup



Step 7: Install Jenkins

Click on the Install button to start the installation of Jenkins.

Windows Install Jenkins

Additionally, clicking on the Install button will show the progress bar of installation, as shown below:

Windows Installation Progress


Step 8: Finish Jenkins installation

Once the installation completes, click on Finish to complete the installation.

Jenkins will be installed as a Windows Service. You can validate this by browsing the services section, as shown below:

Windows Jenkins Service

See the upgrade steps when you upgrade to a new release.

  • Post-installation setup wizard

After downloading, installing and running Jenkins, the post-installation setup wizard begins.

This setup wizard takes you through a few quick "one-off" steps to unlock Jenkins, customize it with plugins and create the first administrator user through which you can continue accessing Jenkins.

Unlocking Jenkins

When you first access a new Jenkins instance, you are asked to unlock it using an automatically-generated password.

Step 1

Browse to http://localhost:8080 (or whichever port you configured for Jenkins when installing it) and wait until the Unlock Jenkins page appears.

Unlock Jenkins page

Step 2

The initial Administrator password should be found under the Jenkins installation path (set at Step 2 in Jenkins Installation).

For default installation location to C:\Program Files\Jenkins, a file called initialAdminPassword can be found under C:\Program Files\Jenkins\secrets.

However, If a custom path for Jenkins installation was selected, then you should check that location for initialAdminPassword file.

Jenkins Initial Password Location

***********
How to run Selenium Tests from Jenkins?
***********
Step 3

Open the highlighted file and copy the content of the initialAdminPassword file.

Jenkins Initial Password File

Click Here :   DevOps Related Posts

Step 4

On the Unlock Jenkins page, paste this password into the Administrator password field and click Continue.
Notes:

  • You can also access Jenkins logs in the jenkins.err.log file in your Jenkins directory specified during the installation.

  • The Jenkins log file is another location (in the Jenkins home directory) where the initial password can also be obtained. Windows Jenkins Log File This password must be entered in the setup wizard on new Jenkins installations before you can access Jenkins’s main UI. This password also serves as the default admininstrator account’s password (with username "admin") if you happen to skip the subsequent user-creation step in the setup wizard.

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

    Pipeline Script Fundamentals

    Click Here :   DevOps Related Posts

*post points fetched from jenkins docs
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



Wednesday, 9 June 2021

What is Jenkins pipeline? How to Create pipeline script in groovy?

 


Click Here :   DevOps Related Posts


Pipeline concepts

The following concepts are key aspects of Jenkins Pipeline, which tie in closely to Pipeline syntax (see the overview below).

Pipeline

A Pipeline is a user-defined model of a CD pipeline. A Pipeline’s code defines your entire build process, which typically includes stages for building an application, testing it and then delivering it.

Also, a pipeline block is a key part of Declarative Pipeline syntax.

Node

A node is a machine which is part of the Jenkins environment and is capable of executing a Pipeline.

Also, a node block is a key part of Scripted Pipeline syntax.

Stage

stage block defines a conceptually distinct subset of tasks performed through the entire Pipeline (e.g. "Build", "Test" and "Deploy" stages), which is used by many plugins to visualize or present Jenkins Pipeline status/progress. [6]

Step

A single task. Fundamentally, a step tells Jenkins what to do at a particular point in time (or "step" in the process). For example, to execute the shell command make use the sh step: sh 'make'. When a plugin extends the Pipeline DSL, [1] that typically means the plugin has implemented a new step.

  DevOps Related Posts

Pipeline syntax overview

The following Pipeline code skeletons illustrate the fundamental differences between Declarative Pipeline syntax and Scripted Pipeline syntax.

Be aware that both stages and steps (above) are common elements of both Declarative and Scripted Pipeline syntax.

Declarative Pipeline fundamentals

In Declarative Pipeline syntax, the pipeline block defines all the work done throughout your entire Pipeline.

Jenkinsfile (Declarative Pipeline)
pipeline {
    agent any 
    stages {
        stage('Build') { 
            steps {
                // 
            }
        }
        stage('Test') { 
            steps {
                // 
            }
        }
        stage('Deploy') { 
            steps {
                // 
            }
        }
    }
}
Execute this Pipeline or any of its stages, on any available agent.
Defines the "Build" stage.
Perform some steps related to the "Build" stage.
Defines the "Test" stage.
Perform some steps related to the "Test" stage.
Defines the "Deploy" stage.
Perform some steps related to the "Deploy" stage


  DevOps Related Posts
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