User Guide

PETEP Configuration

PETEP configuration files are stored in JSON format and are divided into wizard configuration file (petep.json) and project configuration files (project.json, extensions.json, proxies.json, interceptors-C2S.json, interceptors-S2C.json).

Presets

If you want to use PETEP right away and skip project-specific configuration, you can choose one of the existing presets in the Wizard. These presets contain basic configuration of internal PETEP extensions with recommended settings. You can just choose one of the presets, setup proxies, start PETEP and begin with application testing.

Currently, there are the following presets available:

  • FULL - contains all internal extensions with recommended settings (note that the external HTTP proxy interceptors are disabled by default).
  • EXAMPLE - contains all internal extensions with examples (tagger rules, modifier rules, scripts).

You can also create your own presets by adding new subdirectory with all required configuration to the presets directory. (For example, you can setup your project manually and copy it into the presets directory to use it as your own preset.)

Wizard configuration file

PETEP Wizard uses petep.json for storing directories of projects:

[
  "../Test",
  "D:/Projects/Test_1",
  "D:/Projects/Test_2"
]

petep.json is stored in working directory, which can be changed in the petep.bat/petep.sh (by default, app directory is used).

Project configuration files

Configuration of PETEP projects is split into multiple files that are stored inside conf/ directory.

project.json

Project.json is a simple configuration that currently contains only project name and description:

{
  "name": "Test",
  "description": "Simple test project."
}

extensions.json

Extensions.json contains list of extensions used by the project and their stores:

[
  {
    "path": "logger"
  },
  {
    "path": "tcp"
  },
  {
    "path": "external_http_proxy",
    "store": {
      "serverIp": "127.0.0.1",
      "serverPort": 8484,
      "proxyIp": "127.0.0.1",
      "proxyPort": 8080
    }
  }
]

interceptors-C2S.json & interceptors-S2C.json

Interceptors-C2S(S2C).json contains list of interceptors in direction client ← server (server → client):

[
  {
    "code": "catcher",
    "name": "Catcher",
    "description": "",
    "factory": "catcher",
    "enabled": true
  },
  {
    "code": "testlog",
    "name": "TestLog",
    "description": "Test log in direction C2S.",
    "factory": "logger",
    "enabled": true,
    "config": {
      "path": "log/C2S.log"
    }
  }
]

proxies.json

Proxies.json contains list of proxies configured in the project:

[
  {
    "code": "tcp_proxy",
    "name": "TCP Proxy",
    "description": "Simple TCP proxy.",
    "factory": "tcp",
    "enabled": true,
    "config": {
      "proxyIP": "127.0.0.1",
      "targetIP": "127.0.0.1",
      "proxyPort": 8888,
      "targetPort": 1234,
      "bufferSize": 4096,
      "charset": "ISO-8859-1",
      "connectionCloseDelay": 100
    }
  }
]