swittest probe
swittest-probe
is a Python package which belongs to the swittest
ecosystem. It acts as an interface between swittest
(core package) and a card emulation probe. We currently support the probe designed by Paytestlab.
Info
swittest-probe
can interface with the CLI and the web service versions of swittest
.
Installation
To install swittest-probe
on your system you can use the dependency/package mangement tool of your choice (pip, pipx, poetry, pipenv, ...). You simply need to configure an additional source targeting our Nexus repository beforehand.
Note
Please contact our support team to get your Nexus access details.
Core (API package)
swittest-probe
can be imported and used as an API package by any Python application. Simply add the dependency to your project and import the swittest_probe
modules or sub-modules into your code.
CLI (standalone mode)
swittest-probe
is also a standalone application that can be executed on any machine.
Usage
swittest-probe
is a Typer based application that lets you call different commands organized in categories.
Usage: swittest-probe [OPTIONS] COMMAND [ARGS]...
╭─ Options ────────────────────────────────────────────────────────────╮
│ --install-completion Install completion for the current │
│ shell. │
│ --show-completion Show completion for the current shell, │
│ to copy it or customize the │
│ installation. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────╮
│ list Broadcasts info command over network or serial ports to │
│ discover probes. │
│ send Sends commands to the probe using either serial or TCP │
│ communication. │
│ listen Listens to the probe using either serial or TCP │
│ communication. │
│ run Performs a full transaction with the card reader based on │
│ vcard data. │
│ connect Connect to swittest │
╰──────────────────────────────────────────────────────────────────────╯
List
The list
command will scan the environment for connected probes, either through WiFi or USB (virtual COM).
Probe(s) found at:
/dev/cu.usbserial-0001
Send & listen
The send
and listen
commands are unitary steps that can be used to finely manipulate the probe. Most people will rather use the run
one.
Run
The run
command performs a single virtual card transaction based on the virtual card given in argument.
Starting card emulation
Setting communication protocol
Connect
The connect
command connects to swittest
and the probe and waits for test data. Once a test is triggered either from the CLI interface or the service front-end/back-end, the virtual card data will be passed on to swittest-probe
which will handle the communication with the probe through out the test(s).
Connected to 127.0.0.1:65432
Sent POI id: 43102864-5d38-4926-a187-80606a14bd68
APIs
The API documentation is available here