Sparrowdo reports

Finally I have succeeded in suitable sparrowdo reports format, at least it looks fine for me, ūüôā

Consider installing CPAN modules scenario:

user-create 'foo';
cpan-package-install ('CGI', 'Config::Tiny', 'HTTP::Tiny'), %(
    user =>'foo',
    install-base => '/home/foo/',
);

Now sparrowdo report for it looks like:

{create user foo} modules/create/
  useradd: user 'foo' already exists
  uid=1002(foo) gid=1002(foo) groups=1002(foo)
  user created
  ok      scenario succeeded
  ok      text has 'user created'

{create user foo}
  done
  ok      text has 'done'
  STATUS  SUCCEED

{install cpan packages: CGI Config::Tiny HTTP::Tiny}
  @ CPAN package installer

{install cpan packages: CGI Config::Tiny HTTP::Tiny} modules/cpanm/ params: package:CGI
  install CGI into /home/foo/ user foo ...
  CGI is up to date. (4.35)
  install ok
  ok      scenario succeeded
  ok      text has 'install ok'

{install cpan packages: CGI Config::Tiny HTTP::Tiny} modules/cpanm/ params: package:Config::Tiny
 install Config::Tiny into /home/foo/ user foo ...
 Config::Tiny is up to date. (2.23)
 install ok
 ok      scenario succeeded
 ok      text has 'install ok'

{install cpan packages: CGI Config::Tiny HTTP::Tiny} modules/cpanm/ params: package:HTTP::Tiny
 install HTTP::Tiny into /home/foo/ user foo ...
 HTTP::Tiny is up to date. (0.070)
 install ok
 ok      scenario succeeded
 ok      text has 'install ok'
 STATUS  SUCCEED

Here we find a pattern for report blocks:

{ task description, story path, story parameters }
{ @ story description  }
… scenario output¬† …
… scenario output¬† …
… scenario output¬† …
scenario-status
check-status check-message # first one
check-status check-message  # second one
check-status …
check-status check-message # last one
FINAL-TASK-STATUS

Well … story path, story parameters, story description and check statuses are optional and might not appear at reports, but you always get a task description, scenario-status and final task status.

And finally for those who like pictures here is colorful sparrowdo report gets shapshoted from my console:

sparrowdostdout

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s