1.0.1 ā€¢ Published 5 years ago

perimeterx-testing-tool v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Build Status

image

PerimeterX Enforcer TestingTool

This tool is used to test your Enforcer in your local dev environment, by running different testing flows, to ensure the running enforcer is behaving as it should.

Latest stable version: v1.0.1

Table of Contents

Prerequisites

  • NodeJS version 8.0 or higher with NPM.
  • The PerimeterX Enforcer running in test mode.

Please review the installation segment before commiting to master

Installation

PerimeterX testing tool can be used by downloading the project to your machine, and running the appropriate commands.

To install the tool, Run npm install -g perimeterx-testing-tool.

Basic Usage Example

To use PerimeterX Testing tool: 1) Open the terminal 2) cd to the folder where you downloaded the testing tool. 3) Run the px-cli testing tool with the following arguments:

  • -u <url> The URL (with the Enforcer loaded on its path) of the server your are testing
  • -k <key> The key which is being used by the Enforcer url and key are required fields.

NOTE: If you run the tool without any arguments, you will be shown:

Please run px-cli testing tool with the following arguments: -u <url> The URL (with the enforcer loaded on its path) that you would like to -k <key> The key which is being used by the enforcer. This key is used for cookie encryption/decryption.

šŸ‘‰ In the following example, the user has entered all the right arguments (key/url combination). All the tests have passed, and everything seems to be ok.

basicUsage

šŸ‘‰ Now the user has encountered a problem. The tool has successfully connected to the enforcer, but there were some problems with some of the tests. Please validate that:

  • You have entered the right key.
  • The enforcer runs in testing mode.

basicUsage

šŸ‘‰ Here we can see that the user didn't type the necessary key/url combination in order to work.

basicUsage

Troubleshooting

  • If the tests are failing, check if the url and key combination is correct.
  • In order to run the testing tool, the Enforcer has to be integrated in the server.
  • Make sure the Enforcer runs with the testingMode = true.
  • Failed tests display the expected value vs. the actual value. Please take notice when contacting Perimeterx's dev team.