Skip to content
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

Plugin API for greater speed #148

Closed
aslakhellesoy opened this issue Apr 10, 2013 · 5 comments
Closed

Plugin API for greater speed #148

aslakhellesoy opened this issue Apr 10, 2013 · 5 comments

Comments

@aslakhellesoy
Copy link
Contributor

Using Aruba to test a CLI with somewhat slow startup incurs a slow suite of scenarios. For example, this is true for JRuby-based CLIs. This includes Cucumber itself.

Aruba has well-known inputs and outputs:

  • command
  • command line arguments
  • STDIN
  • STDOUT
  • STDERR
  • exit status

We could make this a contract:

class Driver
  def run(cmd, args, stdin, stdout, stderr)
    # run it all
    return status
  end
end

Aruba would ship with a default driver, which forks a process like it currently does

However, people could supply their own driver following the same contract, which would be custom for the app under test, and would run it in the same ruby process.

I got this idea from cucumber/common#432 where @mattwynne and @os97673 were discussing a slow test suite for Cucumber on JRuby.

@mattwynne
Copy link
Member

I like this. Like a Rack adapter but for console apps.

@tooky @os97673 this could help speed up Cucumber's test suite a lot.

@os97673
Copy link
Member

os97673 commented Apr 12, 2013

@mattwynne I've noticed this ticket but postponed it in my list since to make it useful for us I need to figure out how to run JRuby program inside the same JVM (not sure if this is possible). This will take some time for me thus I'm concentrating on 1.3.0 now.

@aslakhellesoy
Copy link
Contributor Author

@os97673 the whole point of this feature is that we wouldn't have to launch a new (j)ruby interpreter from the command line at all. We'd just call some sort of main method within the same ruby process as the one aruba is running in.

@os97673
Copy link
Member

os97673 commented Apr 13, 2013

I see. So the purpose is even more radical change than I have expected :) Need to think about it.

aslakhellesoy added a commit that referenced this issue Apr 16, 2013
@aslakhellesoy
Copy link
Contributor Author

Fixed in 0.5.2!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants