Generic Server of Mocks
Generic Server of Mocks (GSM) is a small web server which mimics the behavior of a real service to ease testing. It also provide a web interface to modify simulated resquests and responses.
Main features are:
- Load mocks.
- Edit mock resquest and response.
- Edit configuration and restart server.
- Edit internal variables to build responses.
- Send messsage directly.
The user interface is split into 5 area. On top and in the bottom, there are descriptive header and footer. On left there a menu panel follow by a short sub area displaying useful tricks. The central area shows main information and control button. Just between this area and the footer, there's a status bar to display informative messages and errors.
- Help message
- Mock list
- Mock edition
- Variable edition
- Server configuration
Server usage
Š…erver flags
- Debug flag: display more informations.
- Mocks list: define list of mocks (json file).
- Listening port: server port.
- Epsilon: threshold for float comparison.
- Exactness flag: by default extra properties are excluded from mock comparison; if this flag is activated, mock comparisons require exactness.
- Root directory: directory where mocks and mock list are located.
- Values file: variables and values file.
Mock comparison
Incomming requests are checked against a list of references.
Standard mock comparison
- Extra properties are excluded.
- Float comparison is bounded by epsilon.
- Array order is not required.
Mock special fields
- Prefix 'regex:' defines a pattern matching.
- Prefix 'var:' defines internal variable which can be recall in response body.
Mock properties
- Identification
- Description
- Request body
- Request header
- Route
- Method
- Response body
- Response code
- Response header
Mock special properties
- Exactness
- Ordering
- Uniquity
Screen-shots
Welcome/Mock list view
Help view
Edit view
Server property
Variable view
Download
Source packages
- GSM version 1.0.1
- GSM version 1.0.0
- GSM version 0.9.3
- GSM version 0.9.2
- GSM version 0.9.1
- GSM version 0.9.0
- GSM version 0.8.5
- GSM version 0.8.4
- GSM version 0.8.3
- GSM version 0.8.2
- GSM version 0.8.1
- GSM version 0.8.0
Requirements
GSM only requires python 3. It has been tested on python 3.7 for Linux and Windows.
Install
To install, one only needs to
- unpack the archive in an accessible directory,
- type
make install to install it in/usr/local or editDESTDIR variable in makefile.
Changelogs
GSM 1.0.1 (Fri Apr 08 11:48:12 2022 +0200)
- minor fixes
GSM 1.0.0 (Thu Apr 07 10:11:39 2022 +0200)
- new feature to manage stored variables
- correct empty body response
- fix server launching process
- send empty json on incorrect json files
- huge cleaning
GSM 0.9.3 (Mon Mar 07 11:19:34 2020 +0100)
- new feature to force uniquity in array
- new flag to force exactness in mock
- new feature to force exactness in mock
- huge modifications on log management
- add log visualiser
GSM 0.9.2 (Thu Feb 15 09:46:15 2020 +0100)
- improve error management and status messages
- add js regression tests
- add python regression tests
GSM 0.9.1 (Fri Feb 4 00:07:42 2022 +0100)
- show and edit server configuration
- fix cors policy issue
GSM 0.9.0 (Wed Feb 2 08:11:23 2022 +0100)
- complet rebuild edit process
- add mock reordering feature
- add mock copying feature
- add mock sending feature
- add non-regression test (coverage target 90%)
- float reference can be compare integer request
- remove ssl support
- factorize code to reduce complexity
- correct lots of bugs
GSM 0.8.5 (Tue Jan 18 07:15:58 2002 +0100)
- fix port argument
- test floats around eps precision
GSM 0.8.4 (Mon Jan 17 08:16:02 2022 +0100)
- remove console log
- fix save order
- avoid processing incompleted mocks
- allow extra elements in ordered array
- fix eslint errors
- manage order in array
- force size of empty line
GSM 0.8.3 (Thu Jan 13 09:15:02 2022 +0100)
- pretty json formatting
- better json reading mechanism
- correct request checks
- make mock list generic
GSM 0.8.2 (Wed Jan 12 10:54:24 2022 +0100)
- corrections
GSM 0.8.1 (Wed Jan 12 08:24:24 2022 +0100)
- package building
GSM 0.8.0 (Mon Jan 10 23:01:00 2022 +0100)
- First public version