DevOpsQA NJ Meetup: Jenkins with Gerrit and BDD Automation

Photo: Crowd at the DevOpsQA NJ meeting Photo Credit: Courtesy DevOpsQA NJ

Crowd at the DevOpsQA NJ meeting | Courtesy DevOpsQA NJ

[This article was reposted with the author’s permission. The original appeared here.]

DevOpsQA NJ recently held its April Meetup on Automation with Jenkins and BDD, with Kishore Bhatia from CloudBees  and Tom Bartolucci from Billtrust as speakers. The venue, food and refreshments were provided by  Audible at a state-of-the-art, vast office space in historical city of Newark.

After fun networking over pizza, wine and beer, we kicked off with Tom Bartolucci’s presentation on BDD Automation framework using Codeception. Tom has been in web software development for over 13 years. He has built applications in Java, .NET, PHP, Python and Javascript for clients in publishing and mobile video. Currently, he is a VP of Development at Billtrust – a SaaS-based payment cycle management company. His team of 13 web developers works on delivering six of the Billtrust SaaS products and uses Codeception, a PHP-based BDD framework to test.

According to Tom (and we all agree), the idea is not to find bugs but prevent them. His team at Billtrust chose Codeception because it allows tests to be written in PHP, which is what its development teams use; it also supports Selenium WebDriver, PhantomJS and BrowserStack; and has hooks for various tools and platforms and build-in reports. As a result, it had a low barrier of entry and got Codeception’s team off the ground quickly. Doing cross-browser testing allowed them to find IE bugs, which they previously missed due to testing primarily in Firefox. Codeception allows testers to create BDD-style readable tests, similar to Cucumber spec but written as code. The easy syntax enabled the QA team to write code that they could read and understand. And developers are able to add custom modules because the framework is developed in PHP, which they are familiar with. Codeception has a variety of uses including to write acceptance tests, unit tests and API tests.

Tom also described how Billtrust integrated Codeception with Jenkins to execute tests and publish reports. He then proceeded with a live demo of the framework. At the end of the session there were a lot of good questions on Vagrant integration, parallelization, failed test rerun and differences between Codeception and Cucumber.

Next, Kishore Bhatia from Cloudbees gave a talk on Jenkins pipelines and Gerrit Code reviews. Kishore Bhatia works for CloudBees, building custom frameworks with open source software and helping customers solve engineering problems around continuous delivery and DevOps at scale. Kishore is a Jenkins expert with development experience in FinTech enterprise software and Cloud platforms. Couple of months back,  Kishore and Issac gave a presentation on Jenkins Workflow,  demonstrating how workflow removes bottleneck of connecting multiple pipelines together.

This time, the focus was on a very valid use case: a large codebase,  many teams contributing to the code. Teams should not collaborate on emails. They should get notifications and post-commit validations done by the tool that they use. In this case it’s Gerrit—Google open source project, offers its own implementation of Git. You just want the job to magically run behind the scenes doing the code reviews for you. The primary challenges in this scenario are that you want to fail-fast—report CI results as soon as any steps fail and make sure there are no orphaned builds.

Kishore then demonstrated the steps involved in implementing this use case in Jenkins including adding pull request validation to the build step, allowing developers to get build status directly in the VCS tool only coming  back to Jenkins if something fails. Currently there is a limitation with posting each status to GitHub. Key things that need to be set up—Gerrit infrastructure, Jenkins installation, workflow that Jenkins will refer to. While it might look complex at first it becomes easier once you start using the workflow, with such things as Groovy script helper. Jenkinsfile will define the flow of what should happen in dev, QA, staging and production.
Kishore then gave a great demo of the flow and answered questions from the audience which covered parallel commits and test data management.

At the end of the sessions, we did a raffle drawing where three lucky winners got prizes sponsored by Audible, including an Amazon Echo. Looking forward to our next session.

If you would like to learn more about Jenkins Workflow, you can reach Kishore at kbhatia@cloudbees.com.   To learn more about exciting opportunities at Audible visit http://about.audible.com/ or  reach out to sonatore@audible.com.

Sharing is caring!

2027 More posts in News category
Recommended for you
Founders & Funders
Here are Some of the Nontech Companies That Pitched to Investors at Founders & Funders (Part 4)

Tech companies weren’t the only startups that came to the New Jersey Economic Development Authority...