Benchmark Framework 2.0: Deploying Tests

Document created by derek Employee on Mar 17, 2015
Version 1Show Document
  • View in full screen mode

benchmark
benchmarks
benchmarking
load testing
performance


Deploying via the Tomcat Manager UI


Assuming Tomcat 7 has been configured to accept manager access remotely, tests can be deployed using the /manager application.  Connect to URL:

 <server-ip>:9080/manager

and upload the test war file.


Deploying using Maven


During development, it is simpler to deploy directly using Maven; checking out a test and building it locally will also allow Maven-based deployment.  The later is useful if a test requires code or configuration tweaks.

Define common names for the servers and capture the login details in ~/.m2/settings.xml:



<settings>
  ...
  <servers>
    ...
    <server>
      <id>bm-remote</id>
      <username>admin</username>
      <password>****</password>
    </server>
  </servers>

</settings>

Ensure that the test pom contains the following:



    <properties>
        ...
        <bm.tomcat.port>9090</bm.tomcat.port>
        <bm.tomcat.ip>localhost</bm.tomcat.ip>
        <bm.tomcat.url>http://${bm.tomcat.ip}:${bm.tomcat.port}/manager/text</bm.tomcat.url>
        <bm.tomcat.server>dev-tomcat</bm.tomcat.server>
    </properties>
    ...
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <configuration>
                    <url>${bm.tomcat.url}</url>
                    <server>${bm.tomcat.server}</server>
                    <port>${bm.tomcat.port}</port>
                    <path>/${project.name}-${project.version}</path>
                </configuration>
            </plugin>
    ...

Projects generated using the archetype will have these included in the pom already.

Deploy with:

 mvn tomcat7:redeploy -DskipTests  -Dbm.tomcat.ip=xxx.xxx.xxx.xxx -Dbm.tomcat.port=9080 -Dbm.tomcat.server=bm-remote



Back: Benchmark Framework 2.0

Attachments

    Outcomes