Continuous Integration in Action at xTuple

 

tjwebb's picture

A Common Language

We wouldn't have become the World's #1 Open-Source ERP if we didn't already work harder than everyone else to test our software. And we're always looking for ways to work smarter as well. xTuple's new Mobile Web Client currently automatically tests itself to validate new features and detect regressions. Developers can press a button to verify that complex business logic meets specification. This process works well for developers working with and among one another, but we'd like to expand this process to include our Quality Assurance, Project Management, and Technical Documentation teams so that each of these critical functions can share knowledge and responsibility on the quality of the delivered product. Teaching businesses of all sizes how to speak a common language -- the language of xTuple ERP -- is what we live and breathe every day, and is the same core strategy we'll use to unify these four critical functions of the software development life cycle. After all, we built our entire technology stack in JavaScript, the most popular language of the Web. You could say that we eat our own words. Or dogfood. Or Ice Cream :)

The Benefits of Continuous Integration

xTuple's innovative all-JavaScript technology stack presents both challenges and opportunities for software developers. This modern approach allows an xTuple developer to use the same language from back-end to browser, and on tablets, desktops, and smartphones. It remains a challenge to ensure that xTuple's sophisticated business logic behaves correctly in all circumstances, so we rely heavily on automated testing frameworks such as Mocha and Zombie to simulate real-world user actions and scenarios. Until recently, we used Jenkins, which works fine, but lacks the deep integration with GitHub and requires much more customization and maintenance. We've taken automation to the next step with Travis-CI, which not only installs xTuple from scratch and puts our application through its paces, it also integrates with GitHub to streamline our code review and QA processes. (Disclaimer: I am Travis-JW, and I am not at all related to Travis-CI. Stop asking me for autographs.) Continuous Integration is no silver bullet, but it can drastically improve software quality and productivity when implemented properly. Problematic code is detected and fixed before being promoted to acceptance testing by QA; developers can pivot more quickly to fix technical issues; the Quality Assurance team can focus on testing that the business specifications are met; Knowledge Management has greater clarity and consistency of application functionality and behavior; and xTuple's customers, partners, and community will all benefit from increases in quality and development speed.

Results

Wow, that all sounds like just about the greatest thing ever, right? Luckily, unlike with closed-source vendors, you needn't stand upwind while we boast about how great things are at xTuple. Since our entire core product is Open Source, we can lift the hood and demonstrate exactly what's happening. This level of transparency means that anyone can see the same command-center view that we use internally to communicate re: the state of the application. We don't see transparency as some abstract thing that makes us interesting, we depend on the discerning scrutiny of our community and our partners to sharpen and evolve our product. If you'd like to dive in and see Continuous Integration at xTuple In Action, follow the links below.

In Action

It's easy to set this up yourself; follow this short guide to set up Travis-CI with your GitHub repository.

With Travis-CI, all pull requests are automatically tested. Before merging any pull request, the project maintainer is shown the status of the tests running on the submitted code.

Tests are currently running

Danger! The tests failed.

In this case, the project maintainer is notified in advance that merging in this code will cause problems. In practice, the maintainer should probably avoid merging this, and instruct the submitter to fix the issues reported by Travis-CI. 

All tests pass!

This is what we want to see. This code is validated automatically, so the project maintainer can merge in this code with confidence. 

A pull request with many commits

Travis-CI also can drill into which individual commits in a pull request are good, and which are problematic. This report shows that the developer who submitted this pull requests ran tests often and used this feedback to fix issues. In the final commit, the tests pass!

Manage

Travis-CI provides a clean management interface for tracking the status and history of builds

 
szuke's picture
Offline
Joined: 12/01/2002
The pace of innovation with

The pace of innovation with open source allows us all to constantly learn new things. Thanks for keep the community in the loop.