TABLE OF CONTENTS
4. Creating a Job and Running a Build using FreeStyle Project
1. Overview
This article provides detailed instructions for setting up Jenkins, configuring Java and Maven, creating and running a Jenkins job, and managing projects for executing Selenium scripts. It covers all necessary steps to automate builds and test executions in Jenkins using a Freestyle project.
2. Prerequisites
- Install Jenkins by following the steps described in Jenkins Installation
- Configure Java and Maven by following the steps described in Configure Java and Maven
- Navigate to the script generated folder and open the cmd prompt by typing cmd in the Folder address bar. Run 'mvn test' command to execute the scripts, wait until 'Build Success' message is seen. This indicates that your scripts are executed successfully.
3. Delete an Existing Project
- In the Dashboard, to delete the existing script, select the scripts generated checkbox, as shown:
- Select the Script Execution dropdown list to delete the project if there are any projects, as shown:
- Click Yes to delete the project.
4. Creating a Job and Running a Build using FreeStyle Project
Perform the following:
- In the Dashboard screen, click Create a Job Plus icon and enter an item name.
- Select Freestyle project option and click OK
- In the Configure tab, select Advance Settings dropdown list.
- Select Use custom workspace option.
- Enter the Directory path.
- Click Apply.
- Click Save.
- Click Configure.
- Click Add build step dropdown list.
- Click Invoke Top-level Maven projects option, as shown:
- Select Maven Version dropdown list.
- Enter the goals and click Apply.
- Click Save.
- Click Build Now.
- Select the Project from the Build History, as shown:
- Click Console Output.
- Console Output contains:
- Build Information: Details about the build number, job name, and build status. For example, success, failure test results.
Log Messages: Output from build steps, including commands executed, and any log messages from scripts or applications.
Error Messages: Warnings and error messages if something went wrong during the build or testing process.
Environment Variables: Information about the environment in which the build is running, such as variable values.
Plugin Outputs: Messages from any installed plugins that are executing during the build process.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article