Re: Register an extension step in Calabash

You can provide your own configuration file. Calabash will load the  
configuration in order from:
  1. /etc/configuration.xml
  2. .calabash in your home directory
  3. .calabash in your current working directory
(see the XProcConfiguration#loadConfiguration() method)

Using the command line, you can also define the configuration file  
using the -c|--config switch.

Now, there is no way (as far as I could see) to use an API to declare  
your own step. Calabash basically uses the class name and reflection  
to load the step instance with the XAtomicStep#run() method.

For our project, I experimented with using OSGi to dynamically  
register a step to Calabash as an OSGi service. It worked quite well,  
but required some slight refactoring of the aforementioned step  
registration process. I intend to contribute this latter modification  
as soon as I clean them a bit (probably later this week).

BR,
Romain.

Le 24 nov. 10 à 11:25, Florent Georges a écrit :

>  Hi,
>
>  I am looking for the way to write an extension step for
> Calabash.  As far as I understand, I can simply extend
> DefaultStep (or anyway implement XProcStep).  But I don't see
> where I can register it.
>
>  The only way I can find from now is to add it to the file
> /etc/configuration.xml.  Which means modifying a file in the
> Calabash JAR :-(
>
>  I have not found any method, say on XProcConfiguration, to
> register an extension step.  Is it possible without modifying
> configuration.xml?
>
>  Regards,
>
> -- 
> Florent Georges
> http://fgeorges.org/
>

Received on Wednesday, 24 November 2010 10:40:28 UTC