/testcontainers-examples

examples! yeah, baby! its really cool! see how to test old legacy java ee app war file by putting it into on-fly-container and test with selenide selenium remote web driver just as simple unit test!

Primary LanguageJava

testcontainers examples JBoss EAP 6.4.22 Testcontainers Selenide Dockerfile Firefox E2E tests

  • ui - JavaEE web app under test for JBoss EAP runtime
  • jboss-testcontainers-selenide-local-e2e-tests - Run custom JBoss EAP testcontainer, wait for health conditions and finally execute local Selenide e2e tests in Chrome browser testcontainer, wait for health conditions and finally execute local Selenide e2e tests in Chrome browser
    # docker is required
    ./mvnw clean package -f ui -DskipTests
    ./mvnw clean test -f jboss-testcontainers-selenide-local-e2e-tests
    # gradle
    ./gradlew clean build -p ui ; ./gradlew clean test -p jboss-testcontainers-selenide-local-e2e-tests
  • jboss-testcontainers-selenide-remote-e2e-tests - Run custom JBoss EAP testcontainer, wait for health conditions and finally execute remote web driver Selenide e2e tests in Chrome or Firefox browsers
  • jboss-testcontainers-selenide-dockerfile-e2e-tests - Run custom JBoss EAP testcontainer by using existing external Dockerfile, wait for health conditions and finally execute remote web driver Selenide e2e tests in Chrome or Firefox browsers
    # docker is required
    ./mvnw clean
    ./mvnw -DskipTests -f ui clean package
    ./mvnw -f jboss-testcontainers-selenide-remote-e2e-tests clean test
    # gradle
    ./gradlew clean build -p ui ; ./gradlew clean test -p jboss-testcontainers-selenide-dockerfile-e2e-tests

JBoss as test-container selenide testing

requires Docker

##./mvnw clean ; ./mvnw -f ui package ; ./mvnw -f jboss-testcontainers-selenide-local-e2e-tests clean test
#./mvnw clean ; ./mvnw -f ui package ; ./mvnw -f jboss-testcontainers-selenide-remote-e2e-tests clean test
./mvnw clean ; ./mvnw -f ui package ; ./mvnw -f jboss-testcontainers-selenide-dockerfile-e2e-tests clean test

windows

mvnw clean package -DskipTests
mvnw test

to switch browser, use: -Dselenide.browser=firefox

gradle

./gradlew clean ui:war ; ./gradlew test
# on ci:
./gradlew clean ui:war ; ./gradlew test -x jboss-testcontainers-selenide-local-e2e-tests:test

windows

gradlew clean build -x test
gradlew test

other repositories

resources