Question:- When do you use ‘git rebase’ instead of ‘git merge’?
Answer:- Both ‘git rebase’ and ‘git merge’ commands are designed to integrate changes from one branch into another branch: just that they just do it in different ways. When we perform rebase of a feature branch onto the master branch, we move the base of the feature branch to the master branch’s ending point. By performing a merge, we take the contents of the feature branch and integrate them with the master branch. As a result, only the master branch is changed, but the feature branch history remains the same. Merging adds a new commit to your history. Rebasing will create inconsistent repositories. For individuals, rebasing makes a lot of sense. Now, in order to see the history completely, the same way as it has happened, we should use merge. Merge preserves history, whereas rebase rewrites it.
Question:- I just made a bad git commit and made it public, and I need to revert the commit. Can you suggest me how to do that?
Answer:- Here we can use the Git command: git revert This command is very helpful because we can revert any commands just by adding the commit ID.
Question:- Can you tell me how to squash the last n commits into a single commit? Is it even possible?
Answer:- To squash the last n commits into a single commit, we can use: git reset -- soft HEAD~n && git commit
Question:- I want to move or copy Jenkins from one server to another. Is it possible? If yes, how?
Answer:- I would suggest copying the Jenkins jobs directory from the old server to the new one. We can just move a job from one installation of Jenkins to another by just copying the corresponding job directory. Or, we can also make a copy of an existing Jenkins job by making a clone of that job directory in a different name. Another way is that we can rename an existing job by renaming the directory. But, if you change the name of a job, you will need to change any other job that tries to call the renamed job.
Question:- Can you tell me, what Continuous Testing and Automation Testing are?
Answer:- Automation testing, as the name suggests, is a process of automating the manual process of testing. It involves the use of separate testing tools that let developers create test scripts that can be executed repeatedly without any manual intervention. Continuous testing is nothing but the process of executing automated tests as part of the software delivery pipeline in DevOps. In this process, each build is tested continuously, allowing the development team to get fast business feedback so that it can prevent the problems from progressing to the next stage of the software delivery lifecycle. This will dramatically speed up a developer’s workflow. He/she no longer needs to manually rebuild the project and re-run all tests after making changes.
Question:- How to launch a browser using WebDriver?
Answer:- For Firefox: WebDriver driver = new FirefoxDriver(); For Chrome: WebDriver driver = new ChromeDriver(); For Internet Explorer (IE): WebDriver driver = new InternetExplorerDriver();
Question:- Are there any technical challenges with Selenium?
Answer:- • It supports only web-based applications. • It does not support the Bitmap comparison. • No vendor support is available for Selenium compared to commercial tools like HP UFT. • As there is no object repository concept, maintainability of objects becomes very complex.
Question:- When should I use Selenium Grid?
Answer:- It can be used to execute the same or different test scripts on multiple platforms and browsers, concurrently, in order to achieve distributed test execution. It allows testing under different environments, remarkably saving the execution time.
Question:- Describe the difference between driver.close() and driver.quit().
Answer:- The driver.close command closes the focused browser window. But, the driver.quit command calls the driver.dispose method which closes all browser windows and also ends the WebDriver session.
Question:- I have 40 jobs in the Jenkins dashboard and I need to build them all at once. Is it possible?
Answer:- Yes, it is. With the help of a Jenkins plugin, we can build projects one after the other. If one parent job is carried out, then automatically other jobs are also run. We also have the option to use Jenkins Pipeline jobs for the same.
Question:- How will you secure Jenkins?
Answer:- The way to secure Jenkins is as follows: • Ensure that the global security is on • Check whether Jenkins is integrated with the company’s user directory with an appropriate plugin • Make sure that Project matrix is enabled to fine-tune access • Automate the process of setting rights or privileges in Jenkins with a custom version-controlled script • Limit physical access to Jenkins data or folders • Periodically run security audits
Question:- The way to secure Jenkins is as follows: • Ensure that the global security is on • Check whether Jenkins is integrated with the company’s user directory with an appropriate plugin • Make sure that Project matrix is enabled to fine-tune access • Automate the process of setting rights or privileges in Jenkins with a custom version-controlled script • Limit physical access to Jenkins data or folders • Periodically run security audits
Answer:- To create a backup, all we need to do is to periodically back up our JENKINS_HOME directory. This contains all of the build configurations of our job, our slave node configurations, and our build history. To create a backup of our Jenkins setup, just copy this directory. We can also copy a job directory to clone or replicate a job or rename the directory.
Question:- What is Jenkins Pipeline and CI/CD Pipeline?
Answer:- Jenkins Pipeline can be defined as a suite of plugins supporting both implementation and integration of Jenkins continuous delivery pipeline.
Question:- What are Puppet Manifests?
Answer:- Every Puppet Node or Puppet Agent has got its configuration details in Puppet Master, written in the native Puppet language. These details are written in a language that Puppet can understand and are termed as Puppet Manifests. These manifests are composed of Puppet codes, and their filenames use the .pp extension. For instance, we can write a manifest in Puppet Master that creates a file and installs Apache on all Puppet Agents or slaves that are connected to the Puppet Master.