ワンクリックで
ワンクリックで
| name | seed4j:test-app |
| description | Generate and compile a Seed4J test application |
Generate and compile a Seed4J CI test application.
Use /test-app <app-name> to generate a test application via tests-ci/generate.sh and verify the generated code compiles and its tests pass.
Example: /test-app spring-boot, /test-app fullapp, /test-app vuejwtapp
$ARGUMENTS contains the application name to test (must match one of the $application blocks in tests-ci/generate.sh).
If no argument is given, ask the user which application they want to test.
Check if the application responds on port 1339:
curl -s -o /dev/null -w "%{http_code}" http://localhost:1339/actuator/health
./mvnw spring-boot:run &
Poll http://localhost:1339/actuator/health every 5 seconds, up to 60 seconds. Stop and inform the user if it never becomes healthy.
rm -rf /tmp/seed4j/<app-name>
Run from the repository root:
./tests-ci/generate.sh <app-name>
The script calls the Seed4J REST API to apply each module in sequence and writes files to /tmp/seed4j/<app-name>. If it exits with a non-zero code, show the error and stop.
Go into the generated project and detect the build tool:
| Condition | Command to run |
|---|---|
mvnw exists | ./mvnw clean verify |
gradlew exists | ./gradlew build |
Neither, but package.json exists | npm install && npm test |
| None of the above | Tell the user: cannot determine build tool |
Run the detected command from inside /tmp/seed4j/<app-name>.
/tmp/seed4j/<app-name>.generate.sh script uses tests-ci/modulePayload.json, which sets projectFolder to /tmp/seed4j/APP_NAME — do not change this.tests-ci/start_docker_compose.sh — the user may need to start the relevant Docker services first.typescriptapp and archunitts have no Java build tool — only npm.