Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,18 @@ jdk_8_maven/em/external/rest/spring-batch-rest/target
/jdk_8_maven/cs/rest/original/spring-ecommerce/target
/jdk_8_maven/em/embedded/rest/spring-ecommerce/target
/jdk_8_maven/em/external/rest/spring-ecommerce/target

/jdk_21_maven/cs/rest-gui/microcks/target
/jdk_21_maven/cs/rest-gui/microcks/commons/model/target
/jdk_21_maven/cs/rest-gui/microcks/commons/util/target
/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/target
/jdk_21_maven/cs/rest-gui/microcks/distro/uber/target
/jdk_21_maven/cs/rest-gui/microcks/distro/uber-async-minion/target
/jdk_21_maven/cs/rest-gui/microcks/webapp/target
/jdk_21_maven/cs/rest-gui/microcks/minions/async/target
/jdk_21_maven/cs/rest-gui/microcks/webapp/src/main/webapp/.angular
/jdk_21_maven/cs/rest-gui/microcks/webapp/src/main/webapp/dist
/jdk_21_maven/cs/rest-gui/microcks/webapp/src/main/webapp/node_modules

/jdk_21_maven/em/embedded/rest-gui/microcks/target
/jdk_21_maven/em/external/rest-gui/microcks/target
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ For simplicity, all schemas are also available as JSON/YML files under the folde
> **IMPORTANT**: More details (e.g., #LOCs and used databases) on these APIs can be found [in this table](statistics/table_emb.md).


### REST: Java/Kotlin (35)
### REST: Java/Kotlin (36)

* **Bibliothek** (MIT), [jdk_17_gradle/cs/rest/bibliothek](jdk_17_gradle/cs/rest/bibliothek), from [https://github.com/PaperMC/bibliothek](https://github.com/PaperMC/bibliothek)

Expand All @@ -96,6 +96,8 @@ For simplicity, all schemas are also available as JSON/YML files under the folde

* **Market** (MIT), [jdk_11_maven/cs/rest-gui/market](jdk_11_maven/cs/rest-gui/market), from [https://github.com/aleksey-lukyanets/market](https://github.com/aleksey-lukyanets/market)

* **Microcks** (Apache), [jdk_21_maven/cs/rest-gui/microcks](jdk_21_maven/cs/rest-gui/microcks), from [https://github.com/microcks/microcks](https://github.com/microcks/microcks)

* **NCS**, [jdk_8_maven/cs/rest/artificial/ncs](jdk_8_maven/cs/rest/artificial/ncs), (not-known license, artificial numerical examples coming from different sources)

* **News** (LGPL), [jdk_8_maven/cs/rest/artificial/news](jdk_8_maven/cs/rest/artificial/news), from [https://github.com/arcuri82/testing_security_development_enterprise_systems](https://github.com/arcuri82/testing_security_development_enterprise_systems)
Expand Down
17 changes: 17 additions & 0 deletions auth/microcks-auth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
auth:
- name: "ADMIN_1"
loginEndpointAuth:
payloadRaw: "username=admin&password=microcks123&grant_type=password&client_id=microcks-serviceaccount&client_secret=ab54d329-e435-41ae-a900-ec6b3fe15c54"
- name: "ADMIN_2"
loginEndpointAuth:
payloadRaw: "username=admin2&password=microcks123&grant_type=password&client_id=microcks-serviceaccount&client_secret=ab54d329-e435-41ae-a900-ec6b3fe15c54"

authTemplate:
loginEndpointAuth:
verb: POST
externalEndpointURL: "http://localhost:8081/realms/microcks/protocol/openid-connect/token"
contentType: application/x-www-form-urlencoded
token:
extractFromField: /access_token
httpHeaderName: Authorization
headerPrefix: "Bearer "
17 changes: 17 additions & 0 deletions dockerfiles/microcks.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM amazoncorretto:21-alpine-jdk

COPY ./dist/microcks-sut.jar .
COPY ./dist/jacocoagent.jar .



#ENV TOOL="undefined"
#ENV RUN="0"

ENTRYPOINT \
java \
# unfortunately dumponexit is completely unreliable in Docker :(
# -javaagent:jacocoagent.jar=destfile=./jacoco/microcks__${TOOL}__${RUN}__jacoco.exec,append=false,dumponexit=true \
-javaagent:jacocoagent.jar=output=tcpserver,address=*,port=6300,append=false,dumponexit=false \
-DPOSTMAN_RUNNER_URL=http://postman:3000 -DSERVICES_UPDATE_INTERVAL='0 0 0/2 * * *' -DKEYCLOAK_URL=http://keycloak:8080 -DKEYCLOAK_PUBLIC_URL=http://localhost:${HOST_PORT:-8081} -DENABLE_CORS_POLICY=false -DCORS_REST_ALLOW_CREDENTIALS=true -DTEST_CALLBACK_URL=http://localhost:${HOST_PORT:-8080} -jar microcks-sut.jar \
--server.port=8080 --spring.profiles.active=prod --grpc.server.port=0 --spring.data.mongodb.uri=mongodb://mongodb:27017/test --spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:${HOST_PORT:-8081}/realms/microcks --spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://keycloak:${HOST_PORT:-8080}/realms/microcks/protocol/openid-connect/certs
80 changes: 80 additions & 0 deletions dockerfiles/microcks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
services:
sut-microcks:
build:
dockerfile: ./dockerfiles/microcks.dockerfile
context: ..
# environment:
# TOOL: ${TOOL:-undefined}
# RUN: ${RUN:-0}
ports:
- "${HOST_PORT:-8080}:8080"
- "${JACOCO_PORT:-6300}:6300"
# volumes:
# default env does not work on volumes
# - ${JACOCODIR}:/jacoco

mongodb:
image: mongo:7.0
tmpfs:
- '/data/db'


environment:
MONGODB_REPLICA_SET_MODE: primary
ALLOW_EMPTY_PASSWORD: yes








keycloak:
image: quay.io/keycloak/keycloak:26.0.0


environment:
KEYCLOAK_ADMIN: 'admin'
KEYCLOAK_ADMIN_PASSWORD: 'admin'
KC_HEALTH_ENABLED: 'true'
KC_METRICS_ENABLED: 'true'



volumes:
- ../scripts/dockerize/data/additional_files/microcks/microcks-realm-sample.json:/opt/keycloak/data/import/microcks-realm.json



healthcheck:
test: ['CMD', 'sh', '-c', "echo -e 'GET /health/live HTTP/1.1\r\nHost: localhost\r\n\r\n' > /dev/tcp/localhost/9000"]
interval: 30s
timeout: 30s
retries: 3


ports:
- '${HOST_PORT:-8081}:8080'



command: ['start-dev', '--hostname=http://localhost:${HOST_PORT:-8081}', '--import-realm', '--health-enabled=true']


postman:
image: quay.io/microcks/microcks-postman-runtime:0.6.0




healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/health']
interval: 30s
timeout: 30s
retries: 3





54 changes: 28 additions & 26 deletions jdk_21_maven/cs/rest-gui/microcks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,32 +102,34 @@
<goals>deploy</goals>
</configuration>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.39.0</version>
<configuration>
<!-- define Java language-specific format -->
<java>
<toggleOffOn />
<eclipse>
<file>${multi-project.rootdir}/eclipse-formatter.xml</file>
</eclipse>
<indent>
<spaces>true</spaces>
<spacesPerTab>3</spacesPerTab>
</indent>
</java>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>
<!-- MODIFIED-->
<!-- <plugin>-->
<!-- <groupId>com.diffplug.spotless</groupId>-->
<!-- <artifactId>spotless-maven-plugin</artifactId>-->
<!-- <version>2.39.0</version>-->
<!-- <configuration>-->
<!-- &lt;!&ndash; define Java language-specific format &ndash;&gt;-->
<!-- <java>-->
<!-- <toggleOffOn />-->
<!-- <eclipse>-->
<!-- <file>${multi-project.rootdir}/eclipse-formatter.xml</file>-->
<!-- </eclipse>-->
<!-- <indent>-->
<!-- <spaces>true</spaces>-->
<!-- <spacesPerTab>3</spacesPerTab>-->
<!-- </indent>-->
<!-- </java>-->
<!-- </configuration>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <goals>-->
<!-- <goal>check</goal>-->
<!-- </goals>-->
<!-- <phase>compile</phase>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- MODIFIED-->
</plugins>
</build>

Expand Down
18 changes: 17 additions & 1 deletion jdk_21_maven/cs/rest-gui/microcks/webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@
</dependencyManagement>

<dependencies>
<!-- MODIFIED-->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.2.0</version>
</dependency>
<!-- MODIFIED-->
<dependency>
<groupId>io.github.microcks</groupId>
<artifactId>microcks-util</artifactId>
Expand Down Expand Up @@ -408,6 +415,11 @@
</profile>
<profile>
<id>prod</id>
<!-- MODIFIED-->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<!-- MODIFIED-->
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -510,7 +522,11 @@
<arguments>
<argument>--spring.profiles.active=prod</argument>
</arguments>
<classifier>exec</classifier>
<!-- MODIFIED-->
<finalName>microcks</finalName>
<classifier>sut</classifier>
<!-- <classifier>exec</classifier>-->
<!-- MODIFIED-->
<excludes>
<!-- Otel agent should be provided at the bootstrap level within the container image -->
<exclude>
Expand Down
1 change: 1 addition & 0 deletions jdk_21_maven/cs/rest-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<modules>
<module>webgoat</module>
<module>microcks</module>
</modules>


Expand Down
64 changes: 64 additions & 0 deletions jdk_21_maven/em/embedded/rest-gui/microcks/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>


<artifactId>evomaster-benchmark-jdk21-em-embedded-rest-gui-microcks</artifactId>
<packaging>jar</packaging>

<parent>
<groupId>org.evomaster</groupId>
<artifactId>evomaster-benchmark-jdk21-em-embedded-rest-gui</artifactId>
<version>3.4.1-SNAPSHOT</version>
</parent>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.10</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>io.github.microcks</groupId>
<artifactId>microcks-app</artifactId>
<version>1.12.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
<version>5.0.1</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-core</artifactId>
<version>5.0.1</version>
</dependency>
<dependency>
<groupId>com.mongodb</groupId>
<artifactId>java-spring-boot-mongodb-starter</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>compile</scope>
<version>4.11</version>
</dependency>
</dependencies>


</project>
Loading
Loading