pytest Integration with Jenkins
Continuous Integration (CI) systems, such as Jenkins, are frequently used to launch tests after each of the code commits. This is one of the major benefits of using a CI system.
Imagine that there is an invisible engineer who is always watching for any changes in the network; upon detecting a change, the engineer will faithfully test a bunch of functions to make sure that nothing breaks. Who wouldn't want that?
Let's look at an example of integrating pytest
into Jenkins tasks.
Jenkins integration
Before we can insert the test cases into our CI, let's install some of the plugins that can help us visualize the operation. The two plugins we will install are build-name-setter and Test Results Analyzer:
Figure 2: Jenkins plugin installation
The test we will run will reach out to the NX-OS device and retrieve the operating system version number. This will ensure that we have API reachability to the Nexus device. The full...