-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should we consolidate our test suites? #305
Comments
Well, I had started writing up this issue many months ago, so I had intended to post this quite a while ago. In the intervening months, I've actually gone pretty far down this path of consolidating the tests, and I picked Ruby and minitest to do that. However, that work is still not complete (it's probably around 75% complete currently), and regardless, I'm still definitely interested in any feedback. So if you don't think Ruby and minitest are the right choice, or you don't think consolidating the tests makes sense at all, or you have any other feedback, I'm all ears. The current work is in the ruby-integration-tests branch. Personally, though, I have found writing the tests in Ruby and minitest to be a better fit (but this just might be my personal preference). The effort of translating tests is pretty monotonous, but it's given an opportunity to clean things up as I go. Obviously, some of the benefits I'm seeing are due to simply redoing things when you always have the benefit of hindsight and being able to re-think things. But in any case, here are a few examples of things I've liked in the new unified test suite:
|
The new test suite has landed in master as part of #312 |
For background, we currently have 2 somewhat distinct test suites in API Umbrella's code base:
So why consider consolidating or changing any of this testing setup? The more immediate driver is the upgrade of the admin-ui component to Ember 2 (#257). This impacts our testing setup in several ways:
So the Ember upgrade is what started some of this thought process to revisit our overall test setup, but there's been some longer standing issues with our test environment that have also been lurking in the back of my mind for a while that might be nice to cleanup:
So I've been wondering whether revisiting our overall test suite might be beneficial. We have to do something to address part of our tests due to the Ember upgrade anyway, but a larger revamp and cleanup of our test suites might have other benefits. Having a single unified test suite might be easier to both run and write new tests for. It might also give us an opportunity to revisit and clean some historical things up that don't make as much sense any more.
If we're going to unify our tests with a single suite, then what are our options? Here's some general ideas I've looked at:
NodeJS
Let's assume we'll continue to use Mocha. There's obviously lots of other testing options for NodeJS, but most of our tests are currently already in Mocha.
Ruby
Currently, our Ruby-based tests are written in RSpec. But I'll also talk about some functionality that would be available if we were to use minitest (Ruby's built-in testing library) instead.
Lua
Since we're using Lua for the proxy component, what about Lua for our tests? I primarily looked at Busted, which seems like one of the most popular testing frameworks for Lua.
Test::Nginx
TestNginx is sort of OpenResty's informal standard for testing, as well for nginx modules written in C.
The text was updated successfully, but these errors were encountered: