You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Pierce T. Wetter III" <pi...@paceap.com> on 2010/04/10 20:16:12 UTC

Suggestion: SeleniumOnlyLauncher

Following protocol to have my suggestions discussed here. 
 
   Suggestion:

     Include a class in tapestry-test that only launches Selenium, not Jetty at all. This lets you run tests where you've launched the application in some other way (various maven plugins, etc. )




 Provided implementation:

public class SeleniumOnly extends SeleniumLauncher
{

    @Override
    protected Runnable launchWebServer(
            String webAppFolder, String contextPath, int port, int sslPort
    ) throws Exception
    {
        System.out.println(" webserver start");

        return new Runnable()
            {
                @Override
                public void run()
                {
                    System.out.println(" webserver stop");
                }
            };
    }
}


Sample testng.xml:

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Schema Tool Test Test" annotations="1.5" verbose="2">
    <parameter name="tapestry.base-url" value="http://localhost:8083/EdenSchemaTool/"/>
    <parameter name="tapestry.port" value="8083"/>
    <parameter name="tapestry.context-path" value="/EdenSchemaTool"/>
    <test name="EdenSchemaTool">
        <packages>
            <package name="com.paceap.eden.schematool.test" />
        </packages>
<classes>
     <class name="com.paceap.eden.schematool.test.SeleniumOnly"/>
   </classes>
    </test>
</suite>


Sample pom.xml excerpt:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                    <suiteXmlFiles>
                        <suiteXmlFile>src/test/conf/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
                <executions>

                    <execution>
                        <id>integration-tests</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                            <suiteXmlFiles>
                                <suiteXmlFile>src/test/conf/testng.xml</suiteXmlFile>
                            </suiteXmlFiles>
                        </configuration>
                    </execution>
                </executions>
            </plugin>




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Suggestion: SeleniumOnlyLauncher

Posted by "Pierce T. Wetter III" <pi...@paceap.com>.
On Apr 10, 2010, at 1:32 PM, Ulrich Stärk wrote:

> Sounds reasonable to me. Could you please file an issue in JIRA for it? It might be down though, so please try later if it doesn't work right away.

Done.

https://issues.apache.org/jira/browse/TAP5-1103


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Suggestion: SeleniumOnlyLauncher

Posted by Ulrich Stärk <ul...@spielviel.de>.
Sounds reasonable to me. Could you please file an issue in JIRA for it? It might be down though, so 
please try later if it doesn't work right away.

Cheers,

Uli

On 10.04.2010 20:16, Pierce T. Wetter III wrote:
> Following protocol to have my suggestions discussed here.
>
>     Suggestion:
>
>       Include a class in tapestry-test that only launches Selenium, not Jetty at all. This lets you run tests where you've launched the application in some other way (various maven plugins, etc. )
>
>
>
>
>   Provided implementation:
>
> public class SeleniumOnly extends SeleniumLauncher
> {
>
>      @Override
>      protected Runnable launchWebServer(
>              String webAppFolder, String contextPath, int port, int sslPort
>      ) throws Exception
>      {
>          System.out.println(" webserver start");
>
>          return new Runnable()
>              {
>                  @Override
>                  public void run()
>                  {
>                      System.out.println(" webserver stop");
>                  }
>              };
>      }
> }
>
>
> Sample testng.xml:
>
> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
> <suite name="Schema Tool Test Test" annotations="1.5" verbose="2">
>      <parameter name="tapestry.base-url" value="http://localhost:8083/EdenSchemaTool/"/>
>      <parameter name="tapestry.port" value="8083"/>
>      <parameter name="tapestry.context-path" value="/EdenSchemaTool"/>
>      <test name="EdenSchemaTool">
>          <packages>
>              <package name="com.paceap.eden.schematool.test" />
>          </packages>
> <classes>
>       <class name="com.paceap.eden.schematool.test.SeleniumOnly"/>
>     </classes>
>      </test>
> </suite>
>
>
> Sample pom.xml excerpt:
>
>              <plugin>
>                  <groupId>org.apache.maven.plugins</groupId>
>                  <artifactId>maven-surefire-plugin</artifactId>
>                  <configuration>
>                      <skip>true</skip>
>                      <suiteXmlFiles>
>                          <suiteXmlFile>src/test/conf/testng.xml</suiteXmlFile>
>                      </suiteXmlFiles>
>                  </configuration>
>                  <executions>
>
>                      <execution>
>                          <id>integration-tests</id>
>                          <phase>integration-test</phase>
>                          <goals>
>                              <goal>test</goal>
>                          </goals>
>                          <configuration>
>                              <skip>false</skip>
>                              <suiteXmlFiles>
>                                  <suiteXmlFile>src/test/conf/testng.xml</suiteXmlFile>
>                              </suiteXmlFiles>
>                          </configuration>
>                      </execution>
>                  </executions>
>              </plugin>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org