# What kind of testing for executables?

**URL:** <https://www.ruby-forum.com/t/what-kind-of-testing-for-executables/190364>\
**Category:** Ruby\
**Created:** [June 18, 2010, 3:45pm UTC](https://www.ruby-forum.com/t/what-kind-of-testing-for-executables/190364 "2010-06-18T15:45:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [June 18, 2010, 3:45pm UTC](https://www.ruby-forum.com/t/what-kind-of-testing-for-executables/190364/1 "2010-06-18T15:45:48Z")

</div>

What kind of testing is it when you test a projects executables:  
system/functional or integration?

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [June 18, 2010, 7:20pm UTC](https://www.ruby-forum.com/t/what-kind-of-testing-for-executables/190364/2 "2010-06-18T19:20:41Z")

</div>

On 6/18/10, Intransition [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> What kind of testing is it when you test a projects executables:  
> system/functional or integration?

These terms are so broad and mean so many things to so many people  
that I think you can just take your pick.

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [June 19, 2010, 7:05am UTC](https://www.ruby-forum.com/t/what-kind-of-testing-for-executables/190364/3 "2010-06-19T07:05:22Z")

</div>

Thomas S. wrote:

> What kind of testing is it when you test a projects executables:  
> system/functional or integration?

Is this about the terminology ?

I’d like to know what tools are being used for testing command-line  
programs ?

I looked around to see samples of shoulda in command line gems but could  
not find any. Currently, I am using a shell program (without a name or  
repo) written by the git people (Junio Hamano) to test git. I used it to  
test a shell app I wrote, and now I an using it for a ruby command line  
app.

Sadly, it compares the standard output of a program - expected vs  
actual. Which means every time I tweak or improve the output, my tests  
fail. It ignores stderr. But otherwise it serves my purpose a lot – far  
better than no auto testing.

If this is OT, I could start a new thread for that.

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [June 19, 2010, 12:16pm UTC](https://www.ruby-forum.com/t/what-kind-of-testing-for-executables/190364/4 "2010-06-19T12:16:48Z")

</div>

On Jun 19, 1:05 am, “R… Kumar” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> not find any. Currently, I am using a shell program (without a name or  
> repo) written by the git people (Junio Hamano) to test git. I used it to  
> test a shell app I wrote, and now I an using it for a ruby command line  
> app.
> 
> Sadly, it compares the standard output of a program - expected vs  
> actual. Which means every time I tweak or improve the output, my tests  
> fail. It ignores stderr. But otherwise it serves my purpose a lot – far  
> better than no auto testing.
> 
> If this is OT, I could start a new thread for that.

No worries. I use either Cucumber (with Aruba) or QED.

And yes, checking the $stdout is part of test assertions, but I keep  
it to specific snippets not the whole output, via  
‘out.index(pattern)’.

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [June 19, 2010, 2:30pm UTC](https://www.ruby-forum.com/t/what-kind-of-testing-for-executables/190364/5 "2010-06-19T14:30:50Z")

</div>

On Jun 19, 6:29 am, “R… Kumar” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is there some project you’ve used Cucumber or QED in (command-line). I  
> could see the test cases, and copy from there.  
> I didn’t find much on the main page of QED. I did glance at Aruba some  
> days back but was lost.

Cucumber and Aruba:  
[http://github.com/proutils/lemon/tree/master/features/](http://github.com/proutils/lemon/tree/master/features/)

QED  
[http://github.com/proutils/pom/tree/master/test/functional/](http://github.com/proutils/pom/tree/master/test/functional/)  
(see bump.rdoc)

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [June 19, 2010, 12:29pm UTC](https://www.ruby-forum.com/t/what-kind-of-testing-for-executables/190364/6 "2010-06-19T12:29:43Z")

</div>

Thomas S. wrote:

> > If this is OT, I could start a new thread for that.
> 
> No worries. I use either Cucumber (with Aruba) or QED.
> 
> And yes, checking the $stdout is part of test assertions, but I keep  
> it to specific snippets not the whole output, via  
> ‘out.index(pattern)’.

Is there some project you’ve used Cucumber or QED in (command-line). I  
could see the test cases, and copy from there.  
I didn’t find much on the main page of QED. I did glance at Aruba some  
days back but was lost.
