Run different testcases using system from ruby

I’m trying to run a few testcases from ruby but using the system but the
thing is that stops when run a different file, this is my example:
system("
ruby temptest/ejemplo.rb --name test02
ruby temptest/example2.rb --name test01
ruby temptest/ejemplo.rb --name testxx
")

it is weird because only runs temptest/ejemplo.rb test02 and testxx
it seems like it cannot run more than one file. I need to run all those
testcases in the same system structure and not in different ones.

Any idea?

I guess nobody has any clue :frowning:

I suppose each test can run ok separately.
Try one (or more) of following

a. try inserting ‘;’ after each ruby call

b. Try inserting ‘&’ after each ruby call
For a. and .b the point is to separate system calls, I am not sure on
how system method will react on your commands as they are not separted
(try to run exactly same in ONE command line)

c. If a. and b. didn’t work, put everying in a one bash script (output
in log file) and call that bash script from system call.

Hope that helps.

http://blog.eugen.co

Mario R. wrote in post #1004356:

I’m trying to run a few testcases from ruby but using the system but the
thing is that stops when run a different file, this is my example:
system("
ruby temptest/ejemplo.rb --name test02
ruby temptest/example2.rb --name test01
ruby temptest/ejemplo.rb --name testxx
")

it is weird because only runs temptest/ejemplo.rb test02 and testxx
it seems like it cannot run more than one file. I need to run all those
testcases in the same system structure and not in different ones.

Any idea?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs