Quick Start: Installation
You can install MockMotor in no time.
Dependencies
Java 1.8+
You need Java installed on the machine. If you don’t have it, download it from here.
That’s all. No other dependencies - no databases, no external tools and no libraries.
Windows 64 bit
Downloading
Download MockMotor Installer.
Installing
Run the downloaded MockMotor Windows Installer application.
MockMotor work directory will be inside of your user home directory, in mockmotor/
subdirectory.
Starting
Execute MockMotor application from the Windows menu.
MockMotor will start and open a browser UI. If you do not see it, you can access the UI at http://localhost:7080/console.
Linux/Unix
Downloading
Download MockMotor Gzipped Tar into a Linux/Unix machine.
Installing
Copy TAR.GZ into a directory of your choice and unpack, for example:
tar xfz mockmotor-1.9.3505.tar.gz
The unpacked files will have this structure:
bin/
startMockMotor.sh
stopMockMotor.sh
mockmotor-1.9.3505.jar
data/
logs/
mockmotor.config.xml
README.txt
Configuring
MockMotor configuration file - mockmotor.config.xml
- is located in the root of unpacked directory:
<config xmlns="http://mockengine.ca/config">
<dataDirectory>data</dataDirectory>
<httpPort>7080</httpPort>
<httpsPort>7081</httpsPort>
<logsDirectory>logs</logsDirectory>
</config>
Check and update the parameters as required:
Property | Meaning | Default |
---|---|---|
dataDirectory | Location of mocks. Make sure this directory has enough space for your mock responses and mock accounts. | data/ in the current directory. |
logsDirectory | Location of logs. MockMotor maintains up to 10 log files 10M each. | logs/ in the current directory. |
httpPort | Plain text HTTP port MockMotor will be listening on. | 7080 |
httpsPort | HTTPS port MockMotor will be listening on. If not provided, HTTPS is disabled. | 7081 |
You can configure the rest of the parameters on the admin UI’s Setting page.
Starting
If Java 1.8+ is not available in the PATH, define JAVA_HOME environment variable to point to Java 1.8+ directory (i.e. the directory one level higher than Java’s bin/ directory).
Execute bin/startMockMotor.sh
script.
MockMotor will go into background, and you can access its UI at
http://<hostname>:7080/console
or
https://<hostname>:7081/console
The port is of course can be different if you’ve updated it in the configuration file.
Troubleshooting
If anything goes wrong, check bin/nohup.out
and logs/mockmotor.log.0
files for any errors:
less bin/nohup.out
less logs/mockmotor.log.0