1. Home
  2. OpKey Help
  3. 22. External Tool Integration with OpKey Web
  4. 22.5 Working with VSTS Build

22.5 Working with VSTS Build

Overview:

VSTS stands for Visual Studio Team Services which allows developers to commit their codes, build it and then use it for test execution. Visual Studio Team Services Build has now been integrated with OpKey Web.

VSTS enables you to automate the build, testing and deployment of your app. In addition, it gives you complete traceability to see everything in the build including changes to your code, reviews, and build results. It helps you to deliver more value to your users with more frequent deployments of a higher quality.

Need of VSTS Build:

Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository, as required. Each check-in is then verified by an automated build, allowing teams to detect problems early. OpKey can easily be integrated into Visual Studio Team Services continuous integration systems. It enables users to trigger Builds execution and detect bugs, if any. Implementing CI helps QA team to catch bugs early in the development cycle, which makes them less expensive to get fixed by the developers.

When many developers collaborate on complex software projects, it may not be feasible for them to integrate different parts of code together. However, you can make this process more efficient and more reliable if you build and deploy your project continuously. Visual Studio Team Services simplifies Continuous integration for your applications regardless of what platform you are targeting, or what language you are using.

VSTS Build allows you to:

  • Build on any platform (Linux, Mac, and Windows)
  • Run your Build on a hosted or private agent
  • Use multi-platform build agents for Android, iOS, Java, .NET, and other applications
  • Track your builds with real-time build status

Pre-requisites:

  • Visual Studio Team Services (VSTS) account. If you don’t have one, you can create from here
  • OpKey SaaS VSTS Plugin.
  • OpKey Execution Stats Plugin (If you want to log bug on TFS).
  • Before executing Build, make sure that hosted or private agent is installed & configured on the machine.
  • OpKey Web Agent must be online.

Using VSTS Build with OpKey Web:

After successful login to your VSTS account, you need to create a Project to work upon.

Let us create a new project.

Enter required fields and click on Create to create a new project.

Once project is successfully created, you need to create a connection between the OpKey Web and VSTS so that you can execute your Build.

Hover your mouse on the Settings icon and then click on the Services option showing in the dropdown.

Click on New Service Endpoint.

Scroll down and select OpKey Web from the showing list of New Service Endpoint.

OpKey Web Connection page opens as follows. Fill all required fields (Connection Name, OpKey Web Server URL, Username and Password) and then click on Verify Connection.

OpKey Web Connection get verified successfully as shown below. Similarly, you can create multiple connections, as required.

Here, you can see the newly created OpKey Web Connection (here RSP1).

The required connection between our OpKey Web and VSTS has established successfully. Now, we need to set an Agent through which Build will be executed.

User have two options of the Agents – Hosted and Private Agent to execute build.

Let us download, configure and run the Private agent.

Navigate to the Agent Queues tab as shown below. Click on the Download Agent link to download the Private agent.

Once the compressed folder of your private Agent has downloaded, extract it.

It contains few files and folders (_diag, bib, externals, config & run) as shown below.

Launch config file on command prompt and then fill all required data, as shown below:

Let us now run the Private Agent. Launch run file on the command prompt.

Now, your Private Agent is configured successfully and it’s now online, as shown below:

Now, you can execute your Build on the Private Agent. Let us create a Build. Navigate to the Build & Release tab. Click on New icon.

Enter required fields and click on Continue.

You can start by selecting a template that will add a set of tasks and apply typical settings for the kind of app that you are building or start with an empty process and build from scratch. To do so, click on Empty Process.

Your Build has been created.

You can execute your Build on the Hosted or Private Agent. Here, you can view the list of all the available agents (Hosted & Private).

Navigate to the Phase 1 & click on Plus sign (+) to add new task. List of all the tasks are listed here.

Click on the Searchbox and type OpKey. Select OpKey Test Suite from the list. Hover your mouse on OpKey Test Suite and then click Add option showing in front of OpKey Test Suite.

OpKey Web Build has been added but you need to fill few required fields to process it further. Click on the OpKey Web Build. Fill all required fields and then click on Save & Queue button.

You can check “Update Mapped Test Management Artifact” checkbox to log a new bug or update the mapped bug.

You can check “Skip Step” checkbox if you want to skip this Test Step, in case all mandatory data input arguments are not given.

You can save your Build definition and queue the Build. To do so, fill required fields and click on Queue.

Once your Build is successfully queued, there would be a message that “Build # successfully queued.” (remove highlights except Build#19)

Click on Queue to execute the Build. Click on the Build link to view the execution logs and result.

Was this article helpful to you? Yes No