Jenkins integration

Before we can insert the test cases into our continuous integration, 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 Result Analyzer:

Jenkins plugin installation

The test we will run will reach out to the NXOS device and retrieve the operating system version number. This will ensure that we have API reachability to the Nexus device. The full script content can be read in chapter13_9_pytest_4.py the relevant pytest portion and result are as follows:

def test_transaction():     assert nxos_version != False## Test Output$ pytest chapter13_9_pytest_4.py ...

Get Mastering Python Networking - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.