Skip to content

Commit 7b8bad3

Browse files
committed
clarification on GitHub dependencies
1 parent c39894a commit 7b8bad3

1 file changed

Lines changed: 42 additions & 32 deletions

File tree

README.md

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@
77
[EvoMaster](http://evomaster.org) Benchmark (EMB):
88
a set of web/enterprise applications for scientific research in Software Engineering.
99

10-
We collected several different systems, in different programming languages, like
11-
Java, Kotlin, JavaScript and C#.
10+
We collected several different systems running on the JVM, in different programming languages such as Java and Kotlin.
1211
In this documentation, we will refer to these projects as System Under Test (SUT).
13-
Currently, the SUTs are either _REST_ or _GraphQL_ APIs.
12+
Currently, the SUTs are either _REST_, _GraphQL_ or _RPC_ APIs.
1413

1514
For each SUT, we implemented _driver_ classes, which can programmatically _start_, _stop_ and _reset_ the state of SUT (e.g., data in SQL databases).
1615
As well as enable setting up different properties in a _uniform_ way, like choosing TCP port numbers for the HTTP servers.
1716
If a SUT uses any external services (e.g., a SQL database), these will be automatically started via Docker in these driver classes.
1817

1918

2019
This collection of SUTs was originally assembled for easing experimentation with the fuzzer called [EvoMaster](http://evomaster.org).
21-
However, finding this type of applications is not trivial among open-source projects.
20+
However, finding this type of application is not trivial among open-source projects.
2221
Furthermore, it is not simple to sort out all the technical details on how to set these applications up and start them in a simple, uniform approach.
2322
Therefore, this repository provides the important contribution of providing all these necessary scripts for researchers that need this kind of case study.
2423

@@ -187,11 +186,44 @@ There are 2 main use cases for EMB:
187186
* Run experiments with other tools
188187

189188
Everything can be setup by running the script `scripts/dist.py`.
190-
Note that you will need installed at least JDK 8, JDK 11, NPM and .NET 3.x, as well as Docker.
191-
Also, you will need to setup environment variables like `JAVA_HOME_8` and `JAVA_HOME_11`.
189+
Note that you will need installed at least Maven, Gradle, JDK 8, JDK 11, JDK 17, NPM, as well as Docker.
190+
Also, you will need to setup environment variables like `JAVA_HOME_8`, `JAVA_HOME_11` and `JAVA_HOME_17`.
192191
The script will issue error messages if any prerequisite is missing.
193192
Once the script is completed, all the SUTs will be available under the `dist` folder, and a `dist.zip` will be created as well (if `scripts/dist.py` is run with `True` as input).
194193

194+
Regarding Maven, most-third party dependencies are automatically downloaded from Maven Central.
195+
However, some dependencies are from GitHub, which unfortunately require authentication to be able to download such dependencies.
196+
In your home folder, you need to create a configuration file for Maven, in particular `.m2/settings.xml`, with the following configurations:
197+
198+
```
199+
<?xml version="1.0" encoding="UTF-8"?>
200+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
201+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
202+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
203+
<servers>
204+
<server>
205+
<id>github</id>
206+
<!-- Old pre Maven 3.9.0 version -->
207+
<username>YOURUSERNAME</username>
208+
<password>???</password>
209+
<!-- New post Maven 3.9.0 version -->
210+
<configuration>
211+
<httpHeaders>
212+
<property>
213+
<name>Authorization</name>
214+
<value>Bearer ???</value>
215+
</property>
216+
</httpHeaders>
217+
</configuration>
218+
</server>
219+
</servers>
220+
</settings>
221+
```
222+
Which configuration to use depends on the version of Maven (it was changed in version 3.9.0).
223+
In latest versions of Maven, you need to create an authorization token in GitHub (see more info directly on [GitHub documentation pages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry)), and put it instead of `???`.
224+
225+
226+
195227
[//]: # (There is also a Docker file to run `dist.py`, named `build.dockerfile`.)
196228

197229
[//]: # (It can be built with:)
@@ -208,20 +240,14 @@ Once the script is completed, all the SUTs will be available under the `dist` fo
208240

209241

210242

211-
Note that here the drivers will be built as well besides the SUTs, and the SUT themselves will also have an instrumented version (for white-box testing heuristics) for _EvoMaster_ (this is for JavaScript and .NET, whereas instrumentation for JVM is done at runtime, via an attached JavaAgent).
212-
213243
In the built `dist` folder, the files will be organized as follows:
214-
215-
* For JVM: `<name>-sut.jar` will be the non-instrumented SUTs, whereas their executable drivers will be called `<name>-evomaster-runner.jar`.
244+
`<name>-sut.jar` will be the non-instrumented SUTs, whereas their executable drivers will be called `<name>-evomaster-runner.jar`.
216245
Instrumentation can be done at runtime by attaching the `evomaster-agent.jar` JavaAgent. If you are running experiments with EvoMaster, this will be automatically attached when running experiments with `exp.py` (available in the EvoMaster's repository). Or it can be attached manually with JVM option `-Devomaster.instrumentation.jar.path=evomaster-agent.jar` when starting the driver.
217-
* For NodeJS: under the folder `<name>` (for each NodeJS SUT), the SUT is available under `src`, whereas the instrumented version is under `instrumented`. If the SUT is written in TypeScript, then the compiled version will be under `build`.
218-
* For .NET: currently only the instrumented version is available (WORK IN PROGRESS)
219246

220247

221248

222249
For running experiments with EvoMaster, you can also "start" each driver directly from an IDE (e.g., IntelliJ).
223250
Each of these drivers has a "main" method that is running a REST API (binding on default port 40100), where each operation (like start/stop/reset the SUT) can be called via an HTTP message by EvoMaster.
224-
For JavaScript, you need to use the files `em-main.js` under the `instrumented/em` folders.
225251

226252

227253

@@ -235,18 +261,12 @@ Each folder represents a set of SUTs (and drivers) that can be built using the s
235261
For example, the folder `jdk_8_maven` contains all the SUTs that need JDK 8 and are built with Maven.
236262
On the other hand, the SUTs in the folder `jdk_11_gradle` require JDK 11 and Gradle.
237263

238-
For JVM and .NET, each module has 2 submodules, called `cs` (short for "Case Study") and `em` (short for "EvoMaster").
264+
For thr JVM, each module has 2 submodules, called `cs` (short for "Case Study") and `em` (short for "EvoMaster").
239265
`cs` contains all the source code of the different SUTs, whereas `em` contains all the drivers.
240266
Note: building a top-module will build as well all of its internal submodules.
241267

242-
Regarding JavaScript, unfortunately NodeJS does not have a good handling of multi-module projects.
243-
Each SUT has to be built separately.
244-
However, for each SUT, we put its source code under a folder called `src`, whereas all the code related to the drivers is under `em`.
245-
Currently, both NodeJS `14` and `16` should work on these SUTs.
246-
247-
The driver classes for Java and .NET are called `EmbeddedEvoMasterController`.
248-
For JavaScript, they are in a script file called `app-driver.js`.
249-
Note that Java also a different kind of driver called `ExternalEvoMasterController`.
268+
The driver classes for Java are called `EmbeddedEvoMasterController`.
269+
Note that Java also has a different kind of driver called `ExternalEvoMasterController`.
250270
The difference is that in External the SUT is started on a separated process, and not running in the same JVM of the driver itself.
251271

252272

@@ -290,13 +310,3 @@ Branch *develop* is using the most recent SNAPSHOT version of _EvoMaster_.
290310
As that is not published online, you need to clone its repository, and build
291311
it locally (see its documentation on how to do it).
292312

293-
To handle JavaScript, unfortunately there is the need for some manual settings.
294-
However, it needs to be done just once.
295-
296-
You need to create _symbolic_ link inside `EMB\js_npm` that points to the `evomaster-client-js` folder in _EvoMaster_.
297-
How to do this, depends on the Operating System.
298-
Note that in the following, `<some-path>` should be replaced with the actual real paths of where you cloned the _EvoMaster_ and _EMB_ repositories.
299-
300-
Windows: `mklink /D C:\<some-path>\EMB\js_npm\evomaster-client-js C:\<some-path>\EvoMaster\client-js\evomaster-client-js`
301-
302-
Mac: `ln -s /<some-path>/EvoMaster/client-js/evomaster-client-js /<some-path>/EMB/js_npm/evomaster-client-js`

0 commit comments

Comments
 (0)