There are two ways of stopping Traffic Parrot. You can use any of them.
By pressing Ctrl+C:The trafficparrot.properties is located in the main Traffic Parrot directory. Open trafficparrot.properties file in your favourite text editor and update the property values. The names of properties should be self-explanatory. If you have any issues just request help by emailing us .
You can also configure Traffic Parrot by passing arguments to the start script. This will override properties defined in the trafficparrot.properties file.
./start.sh trafficparrot.gui.http.port=20000 trafficparrot.virtualservice.http.port=20001
start.cmd trafficparrot.gui.http.port=20000 trafficparrot.virtualservice.http.port=20001
The list of all available properties that can be configured is available in the trafficparrot.properties file which is located in the main Traffic Parrot directory.
Property name | Description | Example usage |
---|---|---|
trafficparrot.gui.http.port | Port number of the Web UI | trafficparrot.gui.http.port=18080 |
trafficparrot.virtualservice.http.port | HTTP virtual service port number | trafficparrot.virtualservice.http.port=18081 |
trafficparrot.virtualservice.https.port | HTTPS virtual service port number | trafficparrot.virtualservice.https.port=18082 |
trafficparrot.virtualservice.trafficFilesRootUrl | Points to the location of traffic recording and replay files. While recording, new files will be written to that location. While replaying, mappings will be read from that location. Allows for checking-in traffic files to source control like Subversion or GIT (or any other). Currently only "file:" URLs are supported. |
Example on Linux (in one line, no spaces): trafficparrot.virtualservice.trafficFilesRootUrl =file:/home/dev/git/paymentsapi/trafficparrot_files Example on Windows (in one line, no spaces): trafficparrot.virtualservice.trafficFilesRootUrl =file://C:\Users\tom\workspace\sales\api_rec |
cd trafficparrot-x-y-z-instance_1 ./start.sh trafficparrot.gui.http.port=18080 trafficparrot.gui.jmxConnectorServerPort=18085 trafficparrot.virtualservice.http.port=8081 trafficparrot.virtualservice.https.port=18082 trafficparrot.virtualservice.proxy.http.port=18095 trafficparrot.virtualservice.http.management.port=18083 trafficparrot.virtualservice.jms.management.port=19093 trafficparrot.virtualservice.jmxConnectorServerPort=18084 cd ../trafficparrot-x-y-z-instance_2 ./start.sh trafficparrot.gui.http.port=28080 trafficparrot.gui.jmxConnectorServerPort=28085 trafficparrot.virtualservice.http.port=28081 trafficparrot.virtualservice.https.port=28082 trafficparrot.virtualservice.proxy.http.port=28095 trafficparrot.virtualservice.http.management.port=28083 trafficparrot.virtualservice.jms.management.port=29093 trafficparrot.virtualservice.jmxConnectorServerPort=28084
To start, should download the examples project which will help you get started. Also, please follow the instructions below.
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2.19.1</version> <executions> <execution> <id>integration-tests</id> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> <configuration> <includes> <include>**/*IntegrationTest*</include> </includes> <trimStackTrace>false</trimStackTrace> </configuration> </plugin>You should ensure that your Maven Surefire Plugin tests do not overlap:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.19.1</version> <configuration> <excludes> <exclude>**/*IntegrationTest*</exclude> </excludes> </configuration> </plugin>
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.19.1</version> <configuration> <excludes> <exclude>**/*IntegrationTest*</exclude> </excludes> <failIfNoTests>false</failIfNoTests> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2.19.1</version> <executions> <execution> <id>integration-tests</id> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> <configuration> <includes> <include>**/*IntegrationTest*</include> </includes> <trimStackTrace>false</trimStackTrace> </configuration> </plugin> <plugin> <groupId>com.trafficparrot</groupId> <artifactId>trafficparrot-maven-plugin</artifactId> <version>3.10</version> <executions> <execution> <id>start-traffic-parrot</id> <phase>pre-integration-test</phase> <goals> <goal>start</goal> </goals> </execution> <execution> <id>stop-traffic-parrot</id> <phase>post-integration-test</phase> <goals> <goal>stop</goal> </goals> </execution> </executions> <configuration> <acceptLicense>true</acceptLicense> <downloadFrom>file:///${trafficparrot.zip.file}</downloadFrom> <licenseFile>file:///${trafficparrot.license.file}</licenseFile> <httpVirtualServicePort>18081</httpVirtualServicePort> <httpsVirtualServicePort>18082</httpsVirtualServicePort> <jmsConnectionsFile>file:///${project.build.testOutputDirectory}/trafficparrot/jms-connections.json</jmsConnectionsFile> <jmsBrokerType>INTERNAL</jmsBrokerType> <jmsInternalBrokerPort>19091</jmsInternalBrokerPort> <jmsInternalBrokerProvider>ACTIVE_MQ</jmsInternalBrokerProvider> <jmsReplayQueue>true</jmsReplayQueue> <jmsQueueConsumeRequestsFromConnectionId>USE-TRAFFIC-PARROT-INTERNAL-BROKER</jmsQueueConsumeRequestsFromConnectionId> <jmsQueueReplayResponsesToConnectionId>example-connection-id</jmsQueueReplayResponsesToConnectionId> <jmsReplayTopic>true</jmsReplayTopic> <jmsTopicReplayToConnectionId>example-connection-id</jmsTopicReplayToConnectionId> <ibmMqConnectionsFile>file:///${project.build.testOutputDirectory}/trafficparrot/ibm-mq-connections.json</ibmMqConnectionsFile> <ibmMqReplayQueue>true</ibmMqReplayQueue> <ibmMqQueueConsumeRequestsFromConnectionId>ibm-mq-connection</ibmMqQueueConsumeRequestsFromConnectionId> <ibmMqQueueReplayResponsesToConnectionId>ibm-mq-connection</ibmMqQueueReplayResponsesToConnectionId> <ibmMqReplayTopic>true</ibmMqReplayTopic> <ibmMqTopicReplayToConnectionId>ibm-mq-connection</ibmMqTopicReplayToConnectionId> <additionalJarFiles> <additionalJarFile>file:///${examples.jar.file}</additionalJarFile> <additionalJarFile>file:///${ibm.mq.client.jar.file}</additionalJarFile> </additionalJarFiles> </configuration> </plugin> </plugins> </build> <repositories> <repository> <id>plugin-repository</id> <releases> <checksumPolicy>ignore</checksumPolicy> </releases> <url>file://${project.basedir}/repo</url> </repository> </repositories>You will need to:
To run Traffic Parrot in Docker you will need to use start-foreground.sh instead of start.sh.
Here is an example that should get you started.
FROM openjdk:8u141-jre WORKDIR /opt COPY trafficparrot-*-release-*-bin.zip trafficparrot.zip RUN unzip trafficparrot.zip && rm trafficparrot.zip && mv trafficparrot-*-release-* trafficparrot WORKDIR /opt/trafficparrot CMD ["./start-foreground.sh"]
docker build -t trafficparrot -f TrafficParrotDockerfile .
docker run -p 127.0.0.1:8080:8080 -p 127.0.0.1:8081:8081 -p 127.0.0.1:8083:8083 -p 127.0.0.1:9093:9093 trafficparrot
You can use JMX to monitor Traffic Parrot, for example by using JConsole.
Large enterprises with complex test environments often start with a proof of concept project. If you feel like you do not have very complex test environments in your organisation, or would like to just try the software go ahead and jump straight into the Quick start. Otherwise, here is an example of a plan divided into stages on how you can implement a proof of concept project today.
After completing this first step, you will have a Traffic Parrot installation ready to virtualize assets. This step is usually combined with Stage 1.
If you you are a large enterprise with complex environments you will be required to run prerequisite confirmation tests (bash commands, SSH connections, ...) to confirm environment set up readiness before proceeding to installation. This will help avoiding common pitfalls to speed up the proof of concept project.
After completing this step you will have a solid proof of the value of service virtualization and Traffic Parrot to your organization. Traffic Parrot will be up and running and deliver value; the whole team will not yet know how to use it.
After completing this step, proceed to Stage 2 to enable the whole team.
Introducing other team members to Traffic Parrot. After this step, the team should have been able to virtualize one more service on their own for the given system or across a given team.
Introducing Traffic Parrot to other teams. Showcasing the successful implementation in the first team. Repeat steps 0-2 for other teams.
This documentation is for an old version of Traffic Parrot. There is a more recent Traffic Parrot version available for download at trafficparrot.com