yanne / api-testing

I am using this to test GitHub API
1 stars 0 forks source link

It would be nice to be able to pass system properties to the plugin #324

Open yanne opened 10 years ago

yanne commented 10 years ago

Majority of maven plugin intended to run integration test allow specifying system properties.

For example surefire plugin has following configuration:

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.8</version>
    <configuration>
      <systemPropertyVariables>
        <propertyName>propertyValue</propertyName>
        <buildDirectory>${project.build.directory}</buildDirectory>
        [...]
      </systemPropertyVariables>
    </configuration>

It would be great if maven robot plugin would allow also passing system properties. Of course robot has --variable option, but it is not passed to java system property.

This issue was originally opened at Google Code on Apr 6, 2011.

yanne commented 10 years ago

Original comment by bugg...@gmail.com on Apr 6, 2011.

This was intended to be an enhancement rather than defect

yanne commented 10 years ago

Original comment by dietrich...@googlemail.com on Apr 8, 2011.

Please explain where you want to access the system properties within your tests and why --variable is not sufficient for you.

yanne commented 10 years ago

Original comment by bugg...@gmail.com on Apr 9, 2011.

--variable approach is great for controlling user input, such as application information (for example, directing the robot test suite to a particular application url as a test target). However, system properties seem to be conceptually more appropriate for application's global properties (such as tomcat, activeMq locations, etc) and can be invoked from java system property across multiple robot testsuite without having to explicitly pass it to all consumers.

Not having systemProperties is definitely not a show-stopper for us against using maven robot plugin, but it is a convenience adopted across the team already.

yanne commented 10 years ago

Original comment by mrmall...@gmail.com on Apr 18, 2011.

let's see if we can have this in by version 1.2

yanne commented 10 years ago

Original comment by TuomasKi...@gmail.com on May 19, 2011.

as a workaround I'm using properties:set-system-properties

yanne commented 10 years ago

Original comment by TuomasKi...@gmail.com on May 19, 2011.

surefire was mentioned as example but it could be used to run robotframework altogether which would utilize all of the current and forthcoming maven features such as this system property issue. I think this project could function as surefire/failsafe provider as well.

http://maven.apache.org/plugins/maven-surefire-plugin/examples/providers.html