0% found this document useful (0 votes)
6 views16 pages

interview questions

The document provides various Java and Selenium programming techniques, including methods for string manipulation, locator strategies, synchronization, and handling frames and windows in Selenium. It also covers Cucumber testing concepts such as scenario outlines, hooks, and integration with Jenkins. Additionally, it touches on API testing fundamentals, outlining the core components of an HTTP request.

Uploaded by

Sandeep Bhukele
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views16 pages

interview questions

The document provides various Java and Selenium programming techniques, including methods for string manipulation, locator strategies, synchronization, and handling frames and windows in Selenium. It also covers Cucumber testing concepts such as scenario outlines, hooks, and integration with Jenkins. Additionally, it touches on API testing fundamentals, outlining the core components of an HTTP request.

Uploaded by

Sandeep Bhukele
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Java:

25. How do you remove all occurrences of a given character from an input string in Java?
The String class doesn’t have a method to remove characters. The following example code shows how to use the replace() method to create a new string
without the given character:
String str1 = "abcdABCDabcdABCD";

str1 = str1.replace("a", "");

System.out.println(str1); // bcdABCDbcdABC

26. How do you get distinct characters and their count in a string in Java?
You can create the character array from the string. Then iterate over it and create a HashMap with the character as key and their count as value. The following
example code shows how to extract and count the characters of a string:
String str1 = "abcdABCDabcd";

char[] chars = str1.toCharArray();

Map<Character, Integer> charsCount = new HashMap<>();

for (char c : chars) {


if (charsCount.containsKey(c)) {
charsCount.put(c, charsCount.get(c) + 1);
} else
charsCount.put(c, 1);
}

System.out.println(charsCount); // {a=2, A=1, b=2, B=1, c=2, C=1, d=2, D=1}


Copy

Selenium:
11. What are the different types of Locator Strategy supported by Selenium?
Selenium supports almost all types of locators.

 Class name: Locates the elements using Class Name


 CSS Selector: Locates the Element using CSS selectors
 ID: Locates the Element using the ID attribute
 Name: Locates elements whose NAME attribute matches the search value
 Link Text: Locates anchor elements whose visible text matches the search value
 Partial Link Text: Locates anchor elements whose visible text contains the search value. If multiple elements are matching, only the first
one will be selected.
 Tag Name: Locates elements whose tag name matches the search value

Explain Explicit Implicit and Fluent waits in Selenium?


19. How to type text in an input box using Selenium?
Selenium provides sendKeys() method to type the text in the input box or any editable content. Using sendKeys() command we can type the text.
Example:
WebElement searchBox = driver.findElement(By.name("searchbox"));
searchBox.sendKeys("webdriver");

27. What is an alternative option to driver.get() method to open an URL in Selenium Web Driver?
Another way to open a URL in Selenium WebDriver is by using the driver.navigate().to() method instead of driver.get().

33. How to click on a hyperlink in Selenium?


Using linkText:
driver.findElement(By.linkText("Contact Us")).click();
This command searches for a link on the webpage that says "Contact Us." When it finds the link, it clicks on it, and the user is taken to the Contact Us page
where they can find information to get in touch with support.
Using partialLinkText:
driver.findElement(By.partialLinkText("About")).click();
This command looks for any link that has the word "About" in its text. It could be something like "About Us" or "About Our Company." When it finds a link
containing "About," it clicks on it, redirecting the user to the About page for more information about the company

How can we move to the nth-child element using XPath?


You can select the nth-child element using XPath with the following expression: (//parent-element/*)[n].

How do you handle Synchronization in Selenium WebDriver?


1. Implicit Waits:
 Like setting a general timeout: Selenium will patiently wait a certain amount of time for elements to appear before giving up.
 Good for simple tasks: It's easy to use, but it might waste time if the website is usually fast.
2. Explicit Waits:
 Like checking for specific signs: Selenium looks for specific conditions, like a certain button being clickable, before proceeding.
 More efficient and focused: It doesn't waste time waiting unnecessarily, but it requires more instructions.
3. Fluent Waits:
 Like a customizable waiting game: Selenium can adjust its waiting strategy based on how the website behaves, making it even more
adaptable.
 Very flexible but can be tricky: It offers a lot of control, but it takes more effort to set up correctly.
4. Thread.sleep():
 Like taking a nap: Selenium just pauses for a fixed time, regardless of what's happening on the website.
 Not a good idea: It can cause unreliability and slow down tests, so it's generally avoided.
Remember, choosing the right waiting strategy helps Selenium work smoothly and accurately, ensuring your tests run reliably and efficiently!

35. How to mouse hover over a web element?


// Create an instance of the Actions class
Actions action = new Actions(driver);

// Hover over the web element


action.moveToElement(driver.findElement(By.id("id_of_element"))).perform();
1. Actions Class: Create an instance of the Actions class to handle complex mouse and keyboard actions.
2. moveToElement(): Use this method to specify the web element you want to hover over, identified by its ID.
3. perform(): Call this method to execute the hover action.
This will perform moving the mouse pointer over the specified element.

67. How to Capture Screenshots in Selenium?


1. Using the TakesScreenshot Interface:
This is the most basic and widely used approach:
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;

public class ScreenshotExample {

public static void main(String[] args) throws Exception


{
// Set up your WebDriver instance
WebDriver driver = ...;

// Navigate to the URL


driver.get("https://www.example.com");

//screenshot of the entire page


TakesScreenshot screenshot = (TakesScreenshot) driver;
byte[] screenshotBytes = screenshot.getScreenshotAs(OutputType.BYTES);

// Save the screenshot to a file


FileUtils.writeByteArrayToFile(new File("screenshot.png"), screenshotBytes);

// Quit
driver.quit();
}
}
How to retrieve CSS properties of an element?
To retrieve CSS properties of an element in Selenium WebDriver, you can use the getCssValue() method. Here’s a simple step-by-step method:
1. Find the Element: Use a locator to identify the web element (e.g., By.id(), By.className()).
2. Use getCssValue(): Call the getCssValue("property-name") method on the found element to get the value of the desired CSS property.
// Retrieve the background color of an element with ID "header"
String backgroundColor = driver.findElement(By.id("header")).getCssValue("background-color");

This code finds the element with ID "header" and retrieves its background color. You can replace "background-color" with any other CSS property name to
get its value.

47. How can you Handle Multiple Windows in Selenium?


Sometimes when we click on a particular web element it opens a new window. To locate the web elements on the new window webpage, we need to shift
the focus of selenium from the current page (main page) to the new page. We will try to shift the focus of selenium from one window to another new
window. Here we will use the Chrome browser for which we require ChromeDriver you can download it from the official site of Selenium.
To get the IDs of different windows
import java.util.Set;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class GFGIDsOfWindows {

public static void main(String[] args) throws InterruptedException {


// Set the path for the ChromeDriver executable
System.setProperty("webdriver.chrome.driver", "path/to/chromedriver.exe");

// Create an instance of ChromeDriver


WebDriver driver = new ChromeDriver();

// Open the GeeksforGeeks website


driver.get("https://www.geeksforgeeks.org/");

// Maximize the browser window


driver.manage().window().maximize();

// Delete all cookies


driver.manage().deleteAllCookies();

// Scroll down to locate an element


JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("window.scrollBy(0, 200)");

// Click on the 'Courses at GeeksforGeeks' link


driver.findElement(By.xpath("(//span[text()='Courses at GeeksforGeeks'])[2]")).click();

// Wait for a moment to allow the new page to load


Thread.sleep(2000);

// Click on a specific course (Data Structures and Algorithms)


driver.findElement(By.xpath("(//h4[text()='Data Structures and Algorithms - Self Paced'])[1]")).click();

// Get the ID of the main (parent) window


String parentId = driver.getWindowHandle();
System.out.println("Parent Window ID: " + parentId);

// Get the IDs of all open windows (child windows)


Set<String> windowIds = driver.getWindowHandles();

// Print the IDs of all windows


for (String id : windowIds) {
System.out.println("Window ID: " + id);
}

// Optionally, you can switch back to the parent window if needed


driver.switchTo().window(parentId);

// Close the browser


driver.quit();
}
}
Here you can observe the IDs of windows are different.
CDwindow-EA925E71098EEFBB80858BE787CED1A5 (ID of main window)
CDwindow-C9078346729F1D0CF8AF12E938CE49DD (ID of new window)
How do you manage a frame in Selenium WebDriver?

Answer:

The inline frame, or iframe, is an element of HTML that puts another webpage within the parent page. There are five different ways to handle an iframe in
Selenium WebDriver:

1. Select iframe by ID using driver.switchTo().frame(“ID of the frame”);


2. Use WebDriver commands to interact with the elements of the frame and perform operations

IWebElement elementInsideFrame = driver.FindElement(By.XPath("//input[@id='elementId']")); elementInsideFrame.SendKeys("Hello, frame!");

1. Locate iframe by tagName: driver.switchTo().frame(driver.findElements(By.tagName(“iframe”).get(0));

2. Locate iframe using index: driver.switchTo().frame(0);

3. Switch back to the web content: switchTo().defaultContent()

How do you upload a file using Selenium WebDriver?

Answer:

File upload in Selenium is an automated process that can be done easily by using the sendKeys() method.

But candidates should also be able to explain the two additional methods using the AutoIT tool and Robot Class.

Here are the methods:

1. Upload files using sendKeys: This method is an inbuilt file upload feature with the following syntax:

WebElement upload_file = driver.findElement(By.xpath("//input[@id='file_up']"));

upload_file.sendKeys("C:/Users/Sonali/Desktop/upload.png");

3. What is a Robot class?

Answer:

In Selenium, the Robot class is a Java-based utility class that lets the tester automate tasks that can’t be done using Selenium’s built-in methods – like simulating
keyboard and mouse interactions on-screen for test automation and self-running demos.

Cucumber

Q #18) What is the purpose of the Cucumber Options tag?


Answer: The Cucumber Options tag is used to provide a link between the feature files and step definition files. Each step of the feature file is mapped to a
corresponding method on the step definition file.
Below is the syntax of the Cucumber Options tag:
@CucumberOptions(features="Features",glue={"StepDefinition"})

What are Cucumber parameters?


You can provide dynamic values to your step definitions using cucumber parameters, which are also known as placeholders or variables in Gherkin scenarios.
They are denoted by angle brackets (< >) and serve as placeholders for actual data when running tests. Parameters enhance reusability and flexibility in your
scenarios. For example, <username> and <password> can be parameters for logging into different accounts. In step definitions, you can capture and use these
values for testing.
How can you handle data-driven testing in Cucumber? Explain with an example.
You can use data tables or scenario outlines to handle data-driven testing in Cucumber. With the help of examples, we can see how to use data-driven testing in
Cucumber.
Scenario Outline: User Registration
Given the user is on the registration page
When you enter the "<username>", "<email>", and "<password>"
And click the register button
Then you should see a "<successMessage>"
Examples:
| username | email | password | success message |
| user1 | user1@cn.com | pass1 | Welcome, User 1! |
| user2 | user2@cn.com | pass2 | Welcome, User 2! |
| user3 | user3@ecn.com | pass3 | Registration failed. |

What is the purpose of Cucumber hooks, and how are they used in test execution?
Cucumber hooks are code blocks used for setup tasks in test execution. They help set up the test environment, handle errors, and ensure reusability. Hooks are
defined with annotations or similar constructs and executed at specific points during the test lifecycle, such as before or after scenarios, features, or the entire
test run. They allow you to perform actions like setting up test data, initializing resources, cleaning up after execution, and handling exceptions. Hooks provide
flexibility and consistency in managing and executing the test environment.

Provide an example of the TestRunner class in Cucumber.


Answer:
Package com.sample.TestRunner

importorg.junit.runner.RunWith;

importcucumber.api.CucumberOptions;

importcucumber.api.junit.Cucumber;

@RunWith(Cucumber.class)

@CucumberOptions(features="Features",glue={"StepDefinition"})

public class Runner

What is a cucumber scenario outline example?

A cucumber scenario outline example is a template for creating various scenarios from a collection of input values. The scenario outline is a framework for
building a collection of connected scenarios with similar actions but distinct input values. The different input values that will be used to produce the methods are
represented by placeholders referred to as "sample tables." Consider the following example of a login function that accepts various usernames and passwords:
Scenario Outline: User logs in with valid credentials
Given the user is on the login page
When they enter "<username>" and "<password>"
And they click the login button
Then they should be redirected to the dashboard

Examples:
| username | password |
| user1 | pass1 |
| user2 | pass2 |
| user3 | pass3 |
How do you use Cucumber hooks?

A Cucumber Hook is executed at specific times during the Cucumber test cycle. Hooks are used to perform post-actions after a scenario or step has been
completed and to set up preconditions before they are met. Many hook annotations are provided by Cucumber, which can be used to specify the intended
behavior. A few are listed below.

1. @Before: This hook is executed before each scenario or scenario step. It can be used to do any required setup tasks or to set up the test
environment.

2. @After: This hook is used to determine whether a scenario or a step in a scenario is to be executed. It can be used to teardown the test
environment or perform cleanup operations.

3. @BeforeStep - It is used before each step in a scenario. It can be used to carry out particular tasks before each stage is carried out.

4. @AfterStep: In a scenario, this hook is used after each step. It can be used to carry out particular tasks upon the completion of each stage.

How do you integrate Cucumber with Jenkins?

To integrate Cucumber with Jenkins, you can follow these steps:

1. Install the Jenkins Cucumber plugin.

2. For your Cucumber project, create a Jenkins job.

3. Set up the Jenkins task to use a build script or the command line to run the Cucumber tests.

4. Set up the Cucumber plugin in the Jenkins job to generate Cucumber reports.

5. You can either manually start the Jenkins task or schedule it to execute at a particular time.

pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'mvn clean install'
}
}
stage('Test') {
steps {
sh 'mvn test'
}
post {
always {
cucumber htmlReports: true, jsonReports: true
}
}
}
}
}

This Jenkinsfile creates and tests a Maven-based Cucumber project and uses the Cucumber plugin to produce HTML and JSON reports. This file can be modified
to suit the needs of your project.
API Testing:

1. If I want to test any api , how I will develop a request for the same ? List the core components of an HTTP request.
2. An HTTP request consists of five elements:

 An action (DELETE, GET, POST). This element shows HTTP methods.

 A Uniform Resource Identifier (URI). This element identifies the resource on the server.

 The HTTP version.

 A request header. This element carries the metadata for the message. The metadata could be a format supported by the client, message body
format, browser or client type, cache settings, etc.

 Request body. This element indicates the resource representation or message content.

3. Tell me the common status code for API testing?

 1xx: Informational
 100 Continue: The initial part of a request has been received and has not yet been rejected by the server.
 101 Switching Protocols: The server is switching protocols as requested by the client.
 2xx: Success
 200 OK: The request has succeeded, and the server has returned the requested data (or acknowledgement for methods like POST).
 201 Created: The request has been fulfilled, resulting in the creation of a new resource.
 204 No Content: The server successfully processed the request, but is not returning any content.
 3xx: Redirection
 301 Moved Permanently: The requested resource has been assigned a new permanent URI.
 302 Found: The resource is temporarily located at a different URI, indicated in the response.
 304 Not Modified: The resource has not been modified since the last request, allowing the cached version to be used.
 4xx: Client Error
 400 Bad Request: The server cannot process the request due to a client error (e.g., malformed request syntax).
 401 Unauthorized: Authentication is required and has failed or has not yet been provided.
 404 Not Found: The server cannot find the requested resource, indicating that it may not exist.
 5xx: Server Error
 500 Internal Server Error: The server encountered an unexpected condition that prevented it from fulfilling the request.
 502 Bad Gateway: The server, while acting as a gateway or proxy, received an invalid response from the upstream server.
 503 Service Unavailable: The server is currently unable to handle the request due to temporary overload or maintenance of the server.

What parameters are used in API performance testing?


Several key parameters are used to evaluate API performance during testing:

1. Response Time – This measures the time taken by the API to process a request and provide a response. Faster response times indicate better
performance.
2. Throughput – This metric evaluates the number of API requests handled within a specific time frame, reflecting the system’s ability to manage high
traffic.
3. Error Rate – The percentage of API requests that result in failure or errors is tracked to assess reliability.
4. Latency – The time delay experienced from the moment a client sends a request to the server until the response begins, which impacts user
experience.
5. Scalability – This parameter evaluates the API’s ability to maintain performance levels under increasing load or simultaneous user requests.
6. Resource Utilization – Monitoring CPU, memory, and network usage gives insight into the efficiency of the API under varying loads.

Karate:
Write the following line of Code under userDetails.feature file that we created in Step #5:
Feature: fetching User Details
Scenario: testing the get call for User Details

Given url 'https://reqres.in/api/users/2'


When method GET
Then status 200

code snippet that I wrote to compare two JSON values:

@Karate.Test

Feature("Json Compare")

Scenario Outline ("json compare") {

Given json1 = '<expected_result>'

And json2 = '<actual_result>'

When match json1 json2


1
2 Then status 200
3
}
4
5 Examples
6
| expected_result | actual_result |

| { "name": "john" } | { "name": "john" } |

example of a basic API test written using the Karate framework:

@Test

Feature: Testing API endpoints

Scenario: Make sure the GET endpoint returns valid data

Given url 'http://example.com/api/v1/endpoint'

When method GET

Then status 200

And match response == { id: 1, name: 'John Doe' }

Restassured

10. How do you initiate request specification in REST Assured?

Here is the syntax:

RequestSpecification reqSpec = RestAssured.given();

reqSpec.baseUri("http://localhost:8080")

reqSpec.basePath("/employees");

1. How do you perform chaining in REST Assured?

In the context of object-oriented programming languages, method chaining is used to invoke multiple method calls. Each method returns an object, which allows
multiple calls to be chained into a single line that doesn’t require variables to hold interim results.
In REST Assured, it looks like this:

given()

.baseUri(baseUri)

.queryParam(parameterName, parameterValues)

.accept(contentType).

.when()

.then();

12. Write a code that tests REST API using REST Assured.

Here’s the solution:

import org.testng.annotations.Test;

import io.restassured.RestAssured;

import io.restassured.http.Method;

import io.restassured.response.Response;

import io.restassured.specification.RequestSpecification;

public class EmployeesTest {

@Test

public void GetAllEmoloyees()

// base URL to call

RestAssured.baseURI = "http://localhost:8080/employees/get";

//Provide HTTP method type - GET, and URL to get all employees

//This will give respose

Response employeesResponse = RestAssured.given().request(Method.GET, "/all");

// Print the response in string format


System.out.println(employeesResponse.getBody().asString());

SQL

Join Operation
When you have information about a single object or entity spread across multiple tables, you can use a join operation to combine this information into a single
table. Join operations work by matching the data in a specific column between two or more tables and then combining the rows from these tables into a new
table. Different types of join operations determine how data is matched and combined. You can retrieve a piece of complete information about an object or
entity using join operations from multiple tables.
Example:
CREATE TABLE employees (
employee_id INT,
employee_name VARCHAR(50),
department_id INT
);

INSERT INTO employees (employee_id, employee_name, department_id)


VALUES
(1, 'Juhi', 1),
(2, 'Ruhi', 2),
(3, 'Bharat', 2);

CREATE TABLE departments (


department_id INT,
department_name VARCHAR(50)
);

INSERT INTO departments (department_id, department_name)


VALUES
(1, 'Sales'),
(2, 'Marketing');
SELECT employees.employee_name, departments.department_name
FROM employees
INNER JOIN departments
ON employees.department_id = departments.department_id;

Output:

38. What is a Non-Equi Join?

Write a query to find the names of employees that begin with ‘S’

1 SELECT * FROM EmployeeInfo WHERE EmpFname LIKE 'S%';

Q9. Write a query to fetch top N records.


By using the TOP command in SQL Server:

1 SELECT TOP N * FROM EmployeePosition ORDER BY Salary DESC;

By using the LIMIT command in MySQL:

1 SELECT * FROM EmpPosition ORDER BY Salary DESC LIMIT N;

if we want to count the number of employees in each department and list them in
descending order, we would use:

SELECT Department, COUNT(EmployeeID) AS 'Number of Employees'


FROM Employees
GROUP BY Department
ORDER BY COUNT(EmployeeID) DESC;

25. Write an SQL query to fetch employee names having a salary greater than or
equal to 5000 and less than or equal to 10000.
Here, we will use BETWEEN in the ‘where’ clause to return the EmpId of the
employees with salary satisfying the required criteria and then use it as a subquery to
find the fullName of the employee from the EmployeeDetails table.

SELECT FullName

FROM EmployeeDetails

WHERE EmpId IN

(SELECT EmpId FROM EmployeeSalary

WHERE Salary BETWEEN 5000 AND 10000);

Write an SQL query to join three tables.

At times, you might need to retrieve data from three or more tables at once. A multi-table join requires consecutive JOIN operations: the first and second
tables are joined to form a virtual table and then the third table is joined to this virtual table. Let's take a look at three tables.

Here’s the Employee table.

Emp_ID Emp_Name Emp_No

101 Ashish Kaktan 9450425345

102 Raj Choudhary 8462309621

103 Vivek Oberoi 7512309034

104 Shantanu Khandelwal 9020330023


Emp_ID Emp_Name Emp_No

105 Khanak Desai 8451004522

Here's the Employment table.

Emp_ID Emp_Profile Emp_Email

101 Content Writer ashish@scaler.com

104 Data Analyst shantanu@scaler.com

105 Software Engineer khanak@scaler.com

109 Development Executive akshay@scaler.com

108 Marketing Manager nikita@scaler.com

Here’s the EmpDetail.

Emp_Country Emp_Email Emp_JoinDate

Germany ashish@scaler.com 2021-04-20

India shantanu@scaler.com 2022-12-11

India khanak@scaler.com 2022-01-03

Europe akshay@scaler.com 2023-02-15

Mexico nikita@scaler.com 2020-05-23

SELECT Emp_Name, Emp_No, Emp_Profile, Emp_Country, EmpJoinDate,


FROM Employee e INNER JOIN Employment m ON
e.Emp_ID = m.EMP_ID INNER JOIN EmpDetail d on
d.Emp_Email = m.Emp_Email;

Output:

Emp_Name Emp_No Emp_Profile Emp_Country Emp_JoinDate

101 9450425345 Content Writer Germany 2021-04-20

104 9020330023 Data Analyst India 2022-12-11

105 8451004522 Software Engineer India 2022-01-03

10. How can you join a table to itself?

Another type of join in SQL is a SELF JOIN, which connects a table to itself. In order to perform a self-join, it is necessary to have at least one column (say X)
that serves as the primary key as well as one column (say Y) that contains values that can be matched with those in X. The value of Column Y may be null in
some rows, and Column X need not have the exact same value as Column Y for every row.

Example: Consider the table Employees.

Emp_ID Emp_Name Emp_Profile Emp_Country ManagerId

101 Ashish Kaktan Content Writer Germany 104

104 Raj Choudhary Data Analyst India 108


Emp_ID Emp_Name Emp_Profile Emp_Country ManagerId

105 Vivek Oberoi Software Engineer India 101

108 Shantanu Khandelwal Development Executive Europe 101

109 Khanak Desai Marketing Manager Mexico

For instance, we might wish to display results that only include employees with their managers. By using table aliases and a self-join, this can be
accomplished easily.

SELECT e.Emp_ID, e.Emp_Name, m.FullName as ManagerName


FROM Employees e JOIN Employees m ON e.ManagerId = m.Emp_ID

Output:

Emp_ID Emp_Name ManagerName

101 Ashish Kaktan Raj Choudhary

104 Raj Choudhary Shantanu Khandelwal

105 Vivek Oberoi Ashish Kaktan

108 Shantanu Khandelwal Ashish Kaktan

109 Khanak Desai

Jira:

What is an issue in JIRA?

An issue can be:

 A Software bug

 The Project Task

 The Form for Leave-request

 A Help-desk Ticket

What are the issue types in Scrum project?

In JIRA, an individual unit of work is referred to as issue. The types include:

 Story – single feature that needs to be implemented

 Epic – a big user story

 Bug – problem that needs to be fixed

 Task – generic task that is not a bug or story


Jenkins:

5.

What commands can start Jenkins?


Hide Answer

 To start Jenkins,
 Firstly, open the command prompt
 Secondly, navigate to the directory to locate Jenkins war
 Lastly, run the following command:
D:>java -jar Jenkins.war

Explain Jenkins pipeline.


Hide Answer
A Jenkins pipeline is an automation technique that enables developers to define an
end-to-end process for building, testing, and delivering software by orchestrating
various stages of the software development life cycle. Jenkins pipelines help improve
the efficiency and consistency of software delivery, ensuring faster development
cycles and better code quality.

18.

If in a pipeline, one job works well, but the other fails, what would be your
next step?
Hide Answer

You can simply restart the pipeline from the point it failed by using “restart from
stage”.

Tell me how Jenkins works.


Hide Answer

The following steps define the working of Jenkins

 Jenkins checks for changes in the repository regularly.


 With changes defined, Jenkins develops a new build.
 Next Jenkins moves stage after stage in its usual pipeline.
 If any stage fails, the Jenkins build stops. The software then informs the
respective team about it.
 However, if the stage completes properly, the code implements itself in the
server to begin the testing.
 After the testing phase, Jenkins shares the result with the team.

Priyanka Shantaram Mahale


Atish Fakira Zoting

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy