Test Framework for Jenkins Shared Libraries

  • Renan Vieira Antunes HP Inc.
  • Gabriela Matias Navarro HP Inc.
  • Simone Hanazumi HP Inc.

Resumo


Delivering new features to users as fast and efficiently as possible is a common challenge on software development. A continuous delivery and integration pipeline can be used for this purpose, since it provides an automated way to orchestrate a series of steps for building, versioning, testing and deploying an application code.The newest version of Jenkins works with a concept called pipeline-as-code, where instead of configuring jobs on Jenkins to build, deploy or test the application, the user can implement a shared library with the same purpose. As a result, Jenkins job settings have been transformed into Groovy code, which enables the development of automated unit tests. However, using this pipeline brings the challenge of guaranteeing the high quality of this orchestration process. Unit tests by themselves are not enough to make sure that the implementation of new pipeline features did not add new bugs or changed the pipeline behavior. To do this validation we need to write functional tests, but that requires understanding of Jenkins and Groovy which can make this task complex. For this reason, a test framework was created as a shared library to facilitate the creation of functional tests for Jenkins shared libraries. The framework can execute several pipeline scenarios described by the user and apply them to different projects. The framework helps to ensure a high quality in the pipeline code used to ship your application from development environment until production, resulting in a more reliable process.
Palavras-chave: Jenkins, Shared Library, Test Framework
Publicado
17/09/2018
ANTUNES, Renan Vieira; NAVARRO, Gabriela Matias; HANAZUMI, Simone. Test Framework for Jenkins Shared Libraries. In: SIMPÓSIO BRASILEIRO DE TESTES DE SOFTWARE SISTEMÁTICO E AUTOMATIZADO (SAST), 3. , 2018, São Carlos/SP. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2018 . p. 13–19.