Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
How to or should we test scripts?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
bitkidoku  
View profile   Translate to Translated (View Original)
 More options 27 Aug, 08:30
Newsgroups: comp.software.extreme-programming
From: bitkidoku <b.ev...@gmail.com>
Date: Thu, 27 Aug 2009 00:30:08 -0700 (PDT)
Local: Thurs 27 Aug 2009 08:30
Subject: How to or should we test scripts?
Hi everyone,

We have a system that has some bash scripts running besides Java code.
Since we are trying to "Test Everything That Could Possibly Break" and
those bash scripts may break, we want to test them. The problem is it
is hard to test the scripts.

I would like to hear if anyone has experience on testing bash scripts.
Or should we quit using bash scripts and look for alternative
solutions that are testable?

Thank you for your answers.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Roth  
View profile   Translate to Translated (View Original)
 More options 27 Aug, 23:56
Newsgroups: comp.software.extreme-programming
From: John Roth <johnro...@gmail.com>
Date: Thu, 27 Aug 2009 15:56:35 -0700 (PDT)
Local: Thurs 27 Aug 2009 23:56
Subject: Re: How to or should we test scripts?
On Aug 27, 1:30 am, bitkidoku <b.ev...@gmail.com> wrote:

> Hi everyone,

> We have a system that has some bash scripts running besides Java code.
> Since we are trying to "Test Everything That Could Possibly Break" and
> those bash scripts may break, we want to test them. The problem is it
> is hard to test the scripts.

> I would like to hear if anyone has experience on testing bash scripts.
> Or should we quit using bash scripts and look for alternative
> solutions that are testable?

> Thank you for your answers.

It's been a long time since I did any shell scripting, but IIRC it's
possible to import (include, whatever) a procedure (function, whatever
it's named) from an external file. That's the key to writing a testing
script: you break up your script into independent procedures that can
then be imported into both your running script and your testing
script, and then you have your running script be as simple as
possible.

John Roth


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew  
View profile   Translate to Translated (View Original)
 More options 6 Sep, 19:03
Newsgroups: comp.software.extreme-programming
From: Andrew <marlow.and...@googlemail.com>
Date: Sun, 6 Sep 2009 11:03:58 -0700 (PDT)
Local: Sun 6 Sep 2009 19:03
Subject: Re: How to or should we test scripts?
On 27 Aug, 08:30, bitkidoku <b.ev...@gmail.com> wrote:

> Hi everyone,

> We have a system that has some bash scripts running besides Java code.
> Since we are trying to "Test Everything That Could Possibly Break" and
> those bash scripts may break, we want to test them. The problem is it
> is hard to test the scripts.

> I would like to hear if anyone has experience on testing bash scripts.
> Or should we quit using bash scripts and look for alternative
> solutions that are testable?

> Thank you for your answers.

I have justed to get into this territory. The first thing that was
said when I said "How do I test this shellscript then?" was "It is a
shellscript so it is not portable and wont even execute properly on
windoze". Our build has to work on unix (various flavours) and
windoze. So we converted the scripts to python. This felt like quite a
nuisance at the time but python does come with a unit testing
framework similar to junit, cppunit etc etc. Writing such unit tests
was useful during development but we have not yet managed to find a
neat way of getting these unit tests run automatically during the
continuous integration build.

Regards,

Andrew Marlow


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google