-
Notifications
You must be signed in to change notification settings - Fork 31
Home
AREX, short for Automatic Replay X, is a regression testing tool for software development that allows you to validate APIs and quickly find out what causes differences in responses.
Its core goal is to improve the quality of software development and reduce the cost of testing.
It works by record from entry to all dependencies (such as remote calls and local cache calls) and then restoring all dependencies on replay. Everything is done automatically.
Therefore, it also absolutely supports read and write operations, including synchronous, asynchronous and transactional.
We use ByteBuddy to modify the bytecode of the target class and inject the logic for recording and replaying to build a dynamic instrumentation agent for the Java application which should be bootstrap or attached.
You can find more information about our AREX's agent implementation here.
There is a basic chart that looks like this:
graph TD;
A[AREX]-->B[Configuration Service];
A-->C[Schedule Service];
A-->D[Agent Hook Service];
A-->E[Replay Report Service];
A-->H[Storage Service];
A-->I[Front-End]
-
Front-End is a visual web site that provide entry to all operations in your AREX.
There is a sample image for you to preview as follows:
-
Configuration Service is a sets of configuration APIs for the recording and replaying functions.
For example, what is the frequency and period of recording, and which operations need to be recorded, and which use cases can be replayed, etc.
-
Schedule Service is a set of schedule APIs that provide replay send and retrieve all responses for comparison.
-
Agent Hook Service is a basic component that provides replaying and recording. By default, we implement common technology stack usage like Http Servlet.
-
Replay Report Service is a set of report APIs that provide difference summaries and show the difference result details after the responses are compared.
-
Storage Service is a set of remote storage APIs that provide Agent Hook Service to save records and get responses as mocks. It also provide that Schedule Service to load user cases for replay.
-
Deployments is a couple of scripts to install AREX.
There are some features as follows:
- It can be integrated and used without modifying the source code of your project.
- Supports read and write operations whether synchronous, asynchronous, or transactional.
- No dirty data is generated during testing and no manual data cleaning is required.
- Regression testing no longer needs to generate test cases manually, and it can be reused.
- Support one-click Debug to quickly reproduce online problems.
- Check if your JDK version supports it, we at least support JDK8 and above.
- List components you use in your project, which components are supported by the AREX's Agent. If not you can extend it.
In the Java, there are two ways to install AREX's agent:
- Use the JVM parameter
-javaagent
, the example is as follows:java -javaagent:/path/to/agent.jar -jar myapp.jar
- Write an application yourself using VirtualMachine's attach API. For more information, you can find online examples.
Note that there are additional parameters in our AREX's Agent required:arex.service.name
and arex.storge.model
.
More information on installation can be found here.
In the Java, we use Service Provider Interface mechanism to load services dynamically.
You can find service contracts in our components listed above.
There is a live demo created from Spring-Petclinic.
Welcome to join us, you can change the source code to build what you want by yourself.
- Fork it
- Create your feature branch
- Commit your code changes and push to your feature branch
- Create a new Pull Request
- Code: Apache-2.0