Tuesday, 23 July 2019

What can I do with Traffic Parrot?

"What can I do with Traffic Parrot? I am trying to simulate resource allocation scenario for fog computing. Can I simulate that using Traffic Parrot?" - a trafficparrot.com website visitor via the chat window.

Traffic Parrot is a service virtualisation and API mocking tool, which are two techniques from the test doubles family.

"Sometimes it is just plain hard to test the system under test because it depends on other components that cannot be used in the test environment. This could be because they aren't available, they will not return the results needed for the test or because executing them would have undesirable side effects. In other cases, our test strategy requires us to have more control or visibility of the internal behavior of the SUT."  - Test Double at XUnitPatterns.

For more information have a look at the tutorial: Getting started with stubbing, mocking and service virtualization.

Sunday, 21 July 2019

Traffic Parrot 5.2.0 released, whats new?

We have just released version 5.2.0. Here is a list of the changes that came with the release:


  • WireMock 2.10.1 compatible REST API is now mounted on /api/http/* on the Traffic Parrot UI/API port (default 8080) for example POST /api/http/requests/count can be used to count requests
  • Added gRPC REST API to count the number of requests made that match the given criteria using POST /api/grpc/requests/count and reset the count using DELETE /api/grpc/requests
  • See the OpenAPI documentation or import the Postman workspace for more information.


  • Fix scenarios dropdown UI on Windows browsers


  • Rename "request body" to "request message payload" in the gRPC UI

Sunday, 14 July 2019

Does Traffic Parrot support HTTP/2 (HTTP2)?

Not yet directly. Currently only via gRPC.

gRPC leverages HTTP/2 underneath and benefits from many of the efficiencies of HTTP/2. Traffic Parrot supports gRPC. Traffic Parrot does not support HTTP/2 directly yet, please reach out to us to have a look at the HTTP/2 beta version.

Monday, 8 July 2019

Traffic Parrot 5.1.0 released, whats new?

We have just released version 5.1.0. Here is a list of the changes that came with the release:


  • gRPC improvements
    • Import gRPC proto files using the import button on the gRPC Add/Edit page
    • Convert OpenAPI files to gRPC proto files with openapi2proto using the import button on the gRPC Add/Edit page
    • Use the trafficparrot.virtualservice.grpc.openapi2proto.plugin.location property to configure the openapi2proto binary location, which can be either AUTO_DETECT (which searches the system environment path, go/bin directory and Traffic Parrot plugins directory) or a specific location
  • Configure HTTP proxy mappings on the HTTP Add/Edit page to allow routing some calls to the virtual service and some calls to real services
  • Added support for database queries in responses
    • New {{ databaseQuery }} helper
    • Configure JDBC connections in the database-connections.json file
    • Provide the JDBC driver JAR files for your database in the lib/external folder
  • Added support for default value when using {{ select }} to look up values in CSV files
  • Added support for the IBM®MQ Message ID as Correlation ID pattern


  • When a property is missing from trafficparrot.properties we now report which key is missing in the logs
  • PDF files can now be correctly recorded and replayed as HTTP multipart/related attachments


  • Removed equal to matcher from gRPC edit mapping form (equal to JSON always makes more sense to use than equal to)
  • New toggle trafficparrot.virtualservice.grpc.message.field.naming to choose whether to define gRPC mappings using CAMEL_CASE field names or using the ORIGINAL field name case used in the proto files
  • Binary (non plain text) HTTP responses are now recorded in .bin files

Sunday, 16 June 2019

How to approach Traffic Parrot speed issues during load testing

We had one of our prospects reach out to us this week:

"I am stuck with my POC (Proof Of Concept project) on Traffic Parrot as I am facing out of memory issues at 30 TPS for 100 concurrent users for HTTP and IBM MQ JMS, please advise." -  Test Automation and Service Virtualization Consultant at an Australian Bank

Typically we advise starting by having a look at common approaches to speeding up Traffic Parrot for performance testing which is located here: https://trafficparrot.com/documentation/5.0.x/performance_testing.html

If the guidelines outlined there do not resolve the issue, please contact support@trafficparrot.com, and we will suggest how we can improve the performance of Traffic Parrot in your specific use case.

In this particular case increasing the memory from -Xmx128mb to -Xmx1g (Traffic Parrot JVM heap size increase from 128MB to 1GB) in jvm.args resolved the issue. The issue was that the request to response mappings used by the prospect were complex enough to require higher than standard use of memory for 100 concurrent users.

Saturday, 15 June 2019

Traffic Parrot 5.0.0 release, whats new?

We have released Traffic Parrot 5.0.0. Here is a list of what is included in the new release:


  • New HTTP skeletons feature:
    • OpenAPI specifications are used to generate a list of HTTP skeletons that can be used to help design HTTP mappings in the Traffic Parrot user interface
    • Place OpenAPI specifications in the openapi configuration directory to populate the dropdown menu or use the upload button on the HTTP Add/Edit page next to the dropdown
    • This replaces the old scenarios.js dropdown, which has been removed (see changes section below for migration instructions)
  • Maven plugin improvements:
    • New trafficparrot:check-environment goal to run in the pre-clean phase to check nothing is preventing a successful start of Traffic Parrot
    • Check that there is not an existing Traffic Parrot instance running
    • Check for locked files or directories that are unable to be cleaned on Windows (typically this is because a file is open in a text editor or command prompt)
    • Improved speed when cacheDownload is enabled by also caching the extracted zip file
    • Accept either file:/// or file:// syntax when specifying file URLs
    • Remember to upgrade your plugin version to 5.0.0


  • The randomInteger and randomDouble helpers now return a number type instead of a string, so that they can be combined with other helpers that require a number. For example when combined with the stringFormat helper: {{stringFormat '%02d:%02d' (randomInteger 0 59) (randomInteger 0 59)}}


  • The scenarios.js HTTP dropdown has been removed.
    • We recommend migrating to an OpenAPI specification file which can be used to produce a similar dropdown via the new HTTP skeletons functionality
    • Please email help@trafficparrot.com with your scenarios.js file and we will translate it to an OpenAPI file for you
    • Removed unused property trafficparrot.gui.scenarios.resource.name
  • Improved reporting of port clashes and how to change ports in trafficparrot.properties

I want to learn Service Virtualization

"I want to learn Service Virtualization for mocking. How can I do that?" - An anonymous trafficparrot.com website visitor.

We recommend looking at the Service Virtualization and API mocking tutorials available on our website, starting with Chapter 1: Getting started with stubbing, mocking and service virtualization and then Chapter 2: How to record and replay HTTP SOAP requests and responses to create API mocks.

If you would like to schedule a free 45-minute "Service Virtualization and API mocking" webinar for your company or your team, please reach out to contact@trafficparrot.com, and we will organise it at a time convenient to you and your team.

Wednesday, 12 June 2019

Do you have single user licenses?

Recently a website visitor asked:

"Do you have single user licenses?" - QA Lead at a Russell 3000 company, Pennsylvania.

Yes, we do support the single user scenario. For a single user, we have an option for a single floating license (only one instance allowed to be running at the same time).

If you are interested in single user licenses, we would be happy to provide a quote according to your requirements. Please contact sales@trafficparrot.com for more information.

Friday, 31 May 2019

Error 2085 when creating IBM MQ mocks

Recently we have received a query from an engineer evaluating Traffic Parrot:

"Hi! I am trying to do an MQ stub, but facing some issues. I get an error code 2085, can you please help me out?" - Software Engineer at a Bank, Australia.

Typically error 2085 means the queue or topic your application or Traffic Parrot connects to does not exist on the IBM MQ broker.

It will be hard to help more just by looking at the error code alone. If you see an error like this, please contact support@trafficparrot.com to schedule a quick call with screen sharing to resolve your issue.

Here is a tutorial of JMS IBM MQ: https://trafficparrot.com/tutorials/mocking-or-simulating-jms-ibm-websphere-mq.html
Here is a video tutorial JMS IBM MQ: https://www.youtube.com/watch?v=mWxSuVWnv1M 
Here are the docs for JMS: https://trafficparrot.com/documentation/4.7.x/jms.html
Here is how you can run IBM MQ on Docker for development and testing purposes: https://trafficparrot.com/tutorials/How_run_a_free_Docker_IBM_MQ_for_Developers_on_Windows_Linux_and_AWS.html

Tuesday, 28 May 2019

Is there a free version of Traffic Parrot?

Recently we have received a query from one of our website visitors:

"Hello! Is there free version of Traffic Parrot available?" - Software Engineer at a Software Consultancy, Ukraine.

We do not offer a free version, however, we do have a 14-day trial available.

If you are interested in the enterprise edition, we would be happy to set up a call to discuss budgetary pricing according to your requirements, please contact sales@trafficparrot.com

Alternatively, you can compare the open source tools available on Wikipedia.

Thursday, 4 April 2019

Service Virtualization Test Container Pattern

Traffic Parrot has first-class support for the Service Virtualization Test Container Pattern (also called API Mock Test Container or API Simulation Test Container)

Let's assume if you work with a Jenkins Continuous Integration pipeline and test your microservices there to get to production fast. The more external dependencies the build pipeline has, the more risk you have those dependencies will cause the build to be unstable and fail because of external dependency issues, not related to the code quality. External dependencies should be kept to a minimum. For example, run your database in Docker per build (on Jenkins Slave), not in a shared environment. It is a pattern similar to the "sidecar" container pattern recommended by Jenkins just used in tests.

We recommend running your API mocks in the same process as your tests (and using Service Virtualization As Code - API Mocking As Code). If you decide to run your API mocks or virtual services in a separate process though, run them in a docker container. This way you are taking your automation to the next level, you have a fully automated and reproducible build pipeline.
Because of issues with dependencies, avoid using centralized instances running API mocks and virtual services outside your build pipeline. You can use them for exposing mocks to other teams and departments and for manual exploratory testing, but not in your automated CI builds.

Running in a container like Docker also means you are doing Infrastructure as code with all of its benefits to your business.

Friday, 29 March 2019

How to run Traffic Parrot behind a firewall? How to use a proxy?

Recently one of the Traffic Parrot users asked us:

"When I try to capture traffic from a HTTP API it does not register anything or generate an error, it just does not capture anything. I have a proxy in my company, but I can not find how to tell the application to go through that proxy to make the recording. Please advise." - A developer at a Colombian bank

Are you running Traffic Parrot inside an organisation where you have to use a HTTP Proxy to access APIs?

No problem!

You can find documentation here how to use a HTTP Proxy here: https://trafficparrot.com/documentation/4.4.x/user_guide.html#outbound-http-proxy

Friday, 15 March 2019

How to add requests and responses manually

A user recently asked us this good question.

> I would like to know your inputs for below query: if we do not have any restful API details apart from one URI and one set of Request and response.
> That to URI is not accessible in our dev cloud. then we do not have any recording url for that to put on since it is not accessible. How can we do virtualization here using traffic parrot

You can add requests and responses manually to Traffic Parrot by clicking on HTTP->Add/Edit.

Monday, 4 March 2019

Delaying JMS messages in IBM MQ or Active MQ (mocking and service virtualization)

Starting from version 4.4.0 Traffic Parrot supports delayed JMS messages.

Here is the documentation how to enable delayed messages: https://trafficparrot.com/documentation/4.4.x/jms.html#edit-jms-delay

It is useful in scenarios like performance testing, when you would like to simulate a dependency system that takes a while to process messages asynchronously and its impact on your systems performance.

Wednesday, 13 February 2019

Tutorial: Mocking and simulating gRPC APIs

gRPC is an open source protocol used for remote procedure calls which was initially developed at Google. Traffic Parrot support gRPC service virtualization and API mocking.

If you would like to learn more have a look at the new tutorial Chapter 5: Mocking and simulating gRPC.