Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Control build output for maven build #4

Closed
ostewart opened this issue May 9, 2013 · 3 comments
Closed

Control build output for maven build #4

ostewart opened this issue May 9, 2013 · 3 comments

Comments

@ostewart
Copy link

ostewart commented May 9, 2013

We're using the sauce-connect-plugin to run Selenium tests in our Maven build. Sauce Connect seems to be pretty chatty, though, and I haven't found a clean way to control the output from Maven. It seems there are at least two types of output to control...first is the java.util.logging output coming from SauceConnectTwoManager's StreamGobbler, which I've managed to control if I pass a system property on the Maven command line (-Djava.util.logging.config.file=...) pointing to a logging config file. This reduces some of the output, but requires us to pass a lengthy command line argument whenever we build, since Maven makes it inordinately difficult to set a system property globally from within the build configuration.

Second is some much more verbose output that looks like wire-level request logging of GETs and POSTs to SauceLabs for individual browser interactions. I'm not sure yet where this is being output, but it's now the overwhelming majority of output produced by our build.

Am I missing some way of configuring the logging? Many Maven plugins have a way of passing in system properties in a configuration element, which the sauce-connect-plugin seems to be lacking. That would help control the SauceConnectTwoManager output. It seems another mechanism is also needed, presumably to control output from the SauceConnect subprocess?

Thanks.

@rossrowe
Copy link
Contributor

Hi, thanks for your feedback. I'll take a look into how we can improve the configurability of the logging of Sauce Connect...the GET/POST requests are all logged from within Sauce Connect itself and I'm not sure if it provides a mechanism for changing the log level, but I'll take a look. The Maven plugin is an offshoot of the Sauce Jenkins plugin, which was logging the Sauce Connect messages to the system log rather than the build output, so configurability of the logging messages wasn't really an issue, however I agree that the Maven plugin should provide some more flexibility.

Cheers,

Ross

@rossrowe
Copy link
Contributor

Hi, I've released version 1.0.19 of the Sauce Connect Maven plugin which supports an additional 'quietMode' configuration option, eg.

 <plugin>
            <groupId>com.saucelabs.maven.plugin</groupId>
            <artifactId>sauce-connect-plugin</artifactId>
            <version>1.0.19-SNAPSHOT</version>
            <configuration>
                <sauceUsername>YOUR_SAUCE_USERNAME</sauceUsername>
                <sauceAccessKey>YOUR_SAUCE_ACCESS_KEY</sauceAccessKey>
                <quietMode>true</quietMode>
            </configuration>
            <executions>
                <execution>
                    <id>start-sauceconnct</id>
                    <phase>pre-integration-test</phase>
                    <goals>
                        <goal>start-sauceconnect</goal>
                    </goals>
                </execution>
                <execution>
                    <id>stop-sauceconnect</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>stop-sauceconnect</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

When quietMode is set to true, the plugin will suppress the output of Sauce Connect process.

Please let me know how this goes, and whether you have any further issues.

Cheers,

Ross

@ostewart
Copy link
Author

This meets our needs and is MUCH better. It might also be helpful to have a systemProperties configuration element in order to add system properties to the subprocess (as it's done in the SureFire Plugin, for example). Assuming the output I've been seeing is controllable by system properties, this would allow us to dial up the logging a bit if we're seeing issues, but hopefully filter out more of the noise.

As it stands with the quiteMode setting, all the annoying verbosity is gone, though, so I'm happy with this result. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants