uaihebert / uaiMockServer

uaiMockServer will create a Rest Server for you with only one command line.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

uaiMockServer

Travis Coverage Maven Central

License


Issues Board

I am sure that you could help ;)


uaiMockServer will create a Rest Server for you with only one command line.

This code can create a Standalone jar or you could add the project in your pom.xml and run it with your TDD tests.

The documentation/roadMap/etc can be found in here: https://github.com/uaihebert/uaiMockServer/wiki

The most recent Standalone jar and the Config samples can be found in here: https://github.com/uaihebert/uaiMockServer/tree/master/dist

About the build

  • If you want just to create the project JAR, run the command: mvn clean install
  • If you want to create the Standalone jar, run the command: mvn clean install -Pstandalone

About the configuration

You will find a configuration sample in the Github link above. In the project site you will find all the values allowed in a configuration file. The path of the configuration file will change depending on the approach used:

  • If you will use the Standalone file, by default the file must be in the same folder of the Jar
  • If you use the project in your TDD tests, your file must be in the "src/test/resources" directory
  • You can set a full config file path for each approach, check the documentation for more detail.

Running with your TDD tests

You need to add the project to your pom:

<dependency>
    <groupId>uaihebert.com</groupId>
    <artifactId>uaiMockServer</artifactId>
    <version>1.2.5</version>
    <scope>test</scope>
</dependency>

All you need now is a class to start/shutdown the server:

@RunWith(UaiMockServerRunner.class)
public class YourTestClass {

    @Test
    public void yourTest(){
        // test executing the http request
    }
}

About

uaiMockServer will create a Rest Server for you with only one command line.

License:Apache License 2.0


Languages

Language:Java 60.3%Language:JavaScript 32.9%Language:HTML 6.1%Language:CSS 0.7%