Skip to content

Commit eee6135

Browse files
committed
Start the react app before running the acceptance tests
1 parent 32580ba commit eee6135

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>org.example</groupId>
8+
<artifactId>todomvc-parent</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
<packaging>pom</packaging>
11+
12+
<modules>
13+
<module>todomvc-acceptance-tests</module>
14+
</modules>
15+
16+
<properties>
17+
<maven.compiler.source>17</maven.compiler.source>
18+
<maven.compiler.target>17</maven.compiler.target>
19+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20+
</properties>
21+
</project>

todomvc-acceptance-tests/pom.xml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,39 @@
103103
</configuration>
104104
</plugin>
105105

106+
<plugin>
107+
<groupId>com.bazaarvoice.maven.plugins</groupId>
108+
<artifactId>process-exec-maven-plugin</artifactId>
109+
<version>0.9</version>
110+
<executions>
111+
<execution>
112+
<id>start-app</id>
113+
<phase>pre-integration-test</phase>
114+
<goals>
115+
<goal>start</goal>
116+
</goals>
117+
<configuration>
118+
<name>react-app</name>
119+
<workingDir>${project.basedir}/../react-todomvc</workingDir>
120+
<waitForInterrupt>false</waitForInterrupt>
121+
<healthcheckUrl>http://localhost:7002</healthcheckUrl>
122+
<arguments>
123+
<argument>npm</argument>
124+
<argument>run</argument>
125+
<argument>serve</argument>
126+
</arguments>
127+
</configuration>
128+
</execution>
129+
<execution>
130+
<id>stop-app</id>
131+
<phase>post-integration-test</phase>
132+
<goals>
133+
<goal>stop-all</goal>
134+
</goals>
135+
</execution>
136+
</executions>
137+
</plugin>
138+
106139
<plugin>
107140
<groupId>org.apache.maven.plugins</groupId>
108141
<artifactId>maven-surefire-plugin</artifactId>
@@ -141,7 +174,6 @@
141174
</dependency>
142175
</dependencies>
143176
</plugin>
144-
145177
<plugin>
146178
<groupId>io.qameta.allure</groupId>
147179
<artifactId>allure-maven</artifactId>

0 commit comments

Comments
 (0)