Introduction

We have been working hard on making RVM rock-solid, and to prevent regressions while simultaneously fixing and improving it. As a result, we now have RVM stable and RVM tests. This created a level of stability on which you can rely, and we have already heard that it works and is used to provide stability.

(rvm get stable)

RVM Tests - rvm-test

We have created the tests as an external repository. The tests, theoretically, could be run on another tool as we run them on RVM itself. The tests are located in a public repository on GitHub. The test repo is also connected to Travis CI. This means any change in the tests is also run against RVM using Travis, so we can manage extending tests without influencing the main RVM build status.

DTF - Deryl's Testing Framework

Deryl R. Doucette put a lot of effort in to start RVM-Tests. He also started the first version of the testing tool. As time went on, it was rewritten to be a separate tool and, to honor Deryl's hard work, it was named Deryl's Testing Framework. In short, DTF. It is available in the form of a gem, and the sources are available here.

For now, DTF allows only one testing format which is a "comment test." This format is meant to allow writing scripts that can be executed by Bash, but when run by DTF their comments are interpreted and provide test cases

DTF was designed primarily to run tests with Bash, and for now, is limited internally to execute only Bash tests, but the plan is to allow running any language as plugins.

Better scripting

Thank you all for the effort you've put in as we can start work on RVM 2.0, which is a new generation of scripting, providing the same or greater level of features as RVM 1.x. RVM 2.0 will be written with good "module" separation using SM framework which can be found at https://github.com/sm.

SM, as the core for RVM 2.0, has a few points that will make implementation a lot simpler, and easier. SM provides infrastructure for building modules and already provides a far-reaching set of modules which cover a great majority of items we need in RVM. Not only do they cover our needs, but also they will also allow us to cross the boundaries and do unbelievable things!

The fine granulation in in SM will allow us to write additional tests that will allow more unit testing, thus allowing us to find bugs faster and easier in the source where they appear.

Request For Assistance

But, as you all know, writing proper tests is not always the easiest thing, especially when coming to a project with so many use cases. RVM, therefore, needs your help! Our test cases do not cover all the possibilities! Actually, they don't yet cover all of the most important parts of RVM!

To make RVM even more stable, and to make sure that you can always rely on it—whether in development or production—we need more test cases and reviews of the existing tests. To make this happen, and to keep compatibility with RVM 1.x while keeping RVM 1.x stable, we need your help with the tests! Anything thaqt you use RVM 1.x for, and want to continue using in RVM 2.x, please add a test for it, so we can keep it working as expected.

There are also a few areas of RVM we are not sure which way we should to choose for our testing focus. This is especially poignant with Ruby, Passenger, and Capistrano integrations. If you have ideas, or experience with similar stuff, please let us know! Actual written tests would be of the greatest help; but please, don't think thats all we want. We will gladly take emails, anecdotes, and informative comments. In short, your help is desired, regardless of your skill level.

Summary

That last paragraph leads me right to the new folks out there. Don't worry if you don't know how to write tests, or even write code! The tests can be always extended, and generally it's enough just to write down your work flow. Feel free to write them in natural English, or your primary language. We can add proper comments to them, and, additional commands can be implemented just to make sure the test flows do not go off track.

Your help would also be appreciated with extending DTF! It's straight up Ruby code and very easily extended as both a stand-alone gem, and as a plugin system. One of the first things we want to do with DTF is create a new input format. Call these "comment specs". These will help everyone, as we can then utilize more human-readable comments in testing RVM, or even other shell scripts. Our goal is to make DTF capable of testing everything from shell scripts, as it does now, to pure Ruby, to perhaps even Python, Perl, or other core languages. Our collective imagination is the only limiting factor!