Skip to content

Commit

Permalink
feat: test results on landing page
Browse files Browse the repository at this point in the history
displaying test results on the landing page mimics the behaviour of the old ui.
  • Loading branch information
bbortt committed Oct 12, 2023
1 parent daaecec commit 178900d
Show file tree
Hide file tree
Showing 138 changed files with 8,183 additions and 970 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ on:
- 'LICENSE'
- 'NOTICE'
jobs:
build:
simulator-ui:
strategy:
fail-fast: true
matrix:
Expand All @@ -51,11 +51,15 @@ jobs:
uses: actions/checkout@v4
- name: Info
run: |
node -version
npm -version
node --version
npm --version
- name: Change to Citrus-Simulator UI
run: cd simulator-ui
- name: Install dependencies
run: npm ci --cache .npm
- name: Lint
run: npm run lint
- name: Prettier
run: npm run prettier:check
- name: Frontend Tests
run: npm run ci:frontend:test
2 changes: 2 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ After forking/cloning the source code repository from [https://github.com/citrus
mvn clean install
```

Add the `-DskipFrontend=false` parameter to include the `simulator-ui` into the build.

## Lombok

This will compile all classes and generate constructors as well as getters and setters using [Project Lombok](https://projectlombok.org/).
Expand Down
36 changes: 18 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@

<javadoc.doclint>none</javadoc.doclint>

<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>

<lombok.version>1.18.20</lombok.version>
<citrus.version>4.0.0-M2</citrus.version>
<spring.boot.version>3.1.2</spring.boot.version>
<spring-boot.version>3.1.2</spring-boot.version>
<spring.version>6.0.9</spring.version>
<spring.ws.version>3.1.3</spring.ws.version>
<testng.version>7.5.1</testng.version>
Expand Down Expand Up @@ -164,7 +166,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -252,12 +254,6 @@
<version>${testng.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.15.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -292,13 +288,6 @@
<encoding>${project.build.sourceEncoding}</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -377,21 +366,32 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<version>3.1.2</version>
<configuration>
<excludes>
<exclude>**/*IT.java</exclude>
</excludes>
<failIfNoTests>false</failIfNoTests>
<forkCount>1</forkCount>
<reuseForks>${reuseForks}</reuseForks>
<failIfNoTests>false</failIfNoTests>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
<version>3.1.2</version>
<configuration>
<failIfNoTests>false</failIfNoTests>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
Expand Down
Binary file modified simulator-docs/src/main/asciidoc/images/dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions simulator-samples/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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/maven-v4_0_0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down Expand Up @@ -41,7 +41,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-bank-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-combined/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-jms-fax/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-jms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-mail/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
8 changes: 1 addition & 7 deletions simulator-samples/sample-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -49,12 +49,6 @@
<artifactId>testng</artifactId>
<scope>test</scope>
</dependency>

<!-- Developer experience -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-swagger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public void testUiInfo() {
"{" +
"\"name\":\"REST Petstore Simulator\"," +
"\"version\":\"@ignore@\"" +
"}" +
"}," +
"\"activeProfiles\": []" +
"}"));
}

Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-ws-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-ws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-wsdl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static void main(String[] args) {

@Override
public String servletMapping(SimulatorWebServiceConfigurationProperties simulatorWebServiceConfiguration) {
return "/services/ws/HelloService/v1/*";
return "/services/ws/HelloService/*";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ citrus.simulator.defaultScenario=Default

# Should Citrus validate incoming messages on syntax and semantics
citrus.simulator.templateValidation=true


logging.level.root=DEBUG
logging.level.web=TRACE
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
* @author Christoph Deppisch
*/
@Test
@ContextConfiguration(classes = SimulatorWebServiceIT.EndpointConfig.class)
public class SimulatorWebServiceIT extends TestNGCitrusSpringSupport {
@ContextConfiguration(classes = SimulatorWebServiceWithWsdlIT.EndpointConfig.class)
public class SimulatorWebServiceWithWsdlIT extends TestNGCitrusSpringSupport {

@Autowired
private WebServiceClient soapClient;
Expand Down
78 changes: 77 additions & 1 deletion simulator-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<artifactId>citrus-simulator-starter</artifactId>
<name>${project.artifactId}</name>

<properties>
<!-- Plugin Management -->
<hibernate.version>6.2.7.Final</hibernate.version>
</properties>

<dependencies>
<!-- Spring Boot -->
<dependency>
Expand All @@ -36,10 +41,17 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>

<!-- Annotation Processors -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<scope>provided</scope>
</dependency>

<!-- embedded database -->
Expand All @@ -48,6 +60,7 @@
<artifactId>h2</artifactId>
</dependency>

<!-- jakarta API -->
<dependency>
<groupId>jakarta.interceptor</groupId>
<artifactId>jakarta.interceptor-api</artifactId>
Expand All @@ -57,6 +70,13 @@
<artifactId>jakarta.transaction-api</artifactId>
</dependency>

<!-- Swagger Documentation -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-common</artifactId>
<version>2.2.0</version>
</dependency>

<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
Expand Down Expand Up @@ -144,5 +164,61 @@
<filtering>true</filtering>
</resource>
</resources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<path>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<version>${spring-boot.version}</version>
</path>
<path>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<!--
This profile is required for applying IDE-specific configuration.
At the moment it configures the Hibernate JPA Metamodel Generator, which you need when working with DTOs and
entity filtering.
-->
<id>IDE</id>
<dependencies>
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Loading

0 comments on commit 178900d

Please sign in to comment.