Edgewall Software
Modify

Opened 14 years ago

Last modified 10 years ago

#623 new enhancement

Add an onerror="ignore" option to the attach command.

Reported by: Stefan Ruppert <stefan.ruppert@…> Owned by:
Priority: minor Milestone: 0.6.1
Component: General Version: 0.6b2
Keywords: Cc:
Operating System: Linux

Description

Is it possilbe to extend the attach command with an attribute onerror="ignore"?

I want to attach a tar archive of log files of all failed tests. If no tests failed I don't want to attach an empty tar archive!

Attachments (0)

Change History (1)

comment:1 Changed 14 years ago by osimons

(Copied in my alternative implementation notes from the mailing list:)

The common way of handling such a use case is to add the attach into its own step after running your test step, and then ignore any errors for this step - that way you wrap the command in an "ignore" handler. I'm a bit hesitant about adding such features at command-level, but rather think that if there was limitations at step-level it should be resolved there for the benefit of running any command. As a suggestion it may be that we implement an onerror="strip" type argument for step that just completely ignores the step if errors occur - nothing gets reported.

If you then add your attachment in such a step you can first try to attach and then echo a line like "Failures uploaded".

  • if no file, nothing gets reported.
  • if file, the file is uploaded and your echo is written to the log.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.