AuTe-Framework
AuTe-Framework copied to clipboard
The Framework for automating isolated or complex testing of the REST API
AuTe Framework - Auto Test Framework
Projects
| Name | Description |
|---|---|
| atf-application | AuTe Framework application |
| atf-wiremock | Wiremock application |
| atf-executor | Test execution logic |
| atf-commons | Common components for all projects |
| atf-application-ui | Frontend for AuTe Framework |
| atf-wiremock-ui | Frontend for Wiremock |
Requirements
- JDK 1.8
- Apache Maven 3
- NodeJS
- npm
Build and run AuTe Framework
- Clone project
- Build project with install nodeJS packages
mvn clean package -P npm-install - Create a working directory for application
- Place in working directory:
- atf-application-version.jar
- env.yml from sample
- run script run.bat or run.sh
- Run in working directory
java -Dloader.path=lib/ -jar atf-application-version.jaror use run script
env.yml description
- projectsDirectoryPath - path to tests repository
- historyLimit - number of stored test runs in history
- mqCheckCount - check count of mqRequests
- mqCheckInterval - interval in milliseconds between checks
- projectStandMap:
- PROJECT_CODE_1:
- serviceUrl - URL of the application under test
- dataBase:
- url - URL to database
- user - database user
- password - database password
- wireMockUrl - wiremock URL
- PROJECT_CODE_2: ...
- PROJECT_CODE_1:
Build and run Wiremock
- Clone project
- Build project with install nodeJS packages
mvn clean package -P npm-install - Create working directory
- Place in working directory:
- atf-wiremock-version.jar
- create application.properties file
- create wiremock mappings configuration file
- Run in working directory
java -Dloader.path=lib/ -Dfile.encoding=UTF-8 -jar atf-wiremock-version.jar
application.properties file description
| Property | Description |
|---|---|
| server.port | application run port |
| logging.file | log file name |
| mq.manager | JMS provider name |
| mq.host | JMS host |
| mq.port | JMS port |
| mq.username | JMS username |
| mq.password | JSM password |
| mq.default.destination.queue.name | |
| properties.yaml.file | Wiremock mappings configuration file name |
| test.id.header.name |
Wiremock mappings configuration file description
Wiremock mapping configuration file has json format.
| Property | Description |
|---|---|
| id | mock's id |
| request | mock's request patter |
| request.url | JMS provider name |
| request.method | JMS host |
| request.headers | JMS port |
| request.bodyPatterns | JMS username |
| response | mock's response |
| response.status | response status |
| response.body | response body |
| response.headers | response headers |
| uuid | mock's uuid |
Run AuTe Framework in Docker
- Build docker images with command
mvn clean package -P dockeror use existed images from DockerHub - Copy docker-compose.yml.sample to your local machine and rename it to docker-compose.yml
- Modify image tags, volumes and ports if needed in local docker-compose.yml
- Change
projectsDirectoryPathin yourenv.ymlto/app/repository/<AT_directory> - Run containers with command
docker-compose upto run both ATF and Wiremock applications ordocker-compose up atfto run ATF only - Go to http://localhost:8080 to check running ATF application
IBM MQ mocking
For mocking IBM MQ you have to find and download
- com.ibm.mq.allclient.jar
- jms.jar
and put it in
/libfolder or another. You can find ibm libs in fix pack Fix Pack 8.0.0.5 for WebSphere MQ v8 or copy it from installed IBM product. You have to put these libs in application classpath for atf-application and for atf-wiremock.
PERFORMANCE
Application may be slow if not set properties:
mqCheckCount: 3 mqCheckInterval: 1000
in file env.yml