vuhung16au / selenium

0 stars 0 forks source link

login 5 users (with error) #1

Open vuhung16au opened 8 months ago

vuhung16au commented 8 months ago

Source code:

Test data:

Errror

vhmac:selenium-itnews vuhung$ mvn clean verify
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< com.vuhung.seleniium:selenium-itnews >----------------
[INFO] Building Serenity project with JUnit and WebDriver 1.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ selenium-itnews ---
[INFO] Deleting /Users/vuhung/eclipse-workspace/selenium-itnews/target
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ selenium-itnews ---
[INFO] skip non existing resourceDirectory /Users/vuhung/eclipse-workspace/selenium-itnews/src/main/resources
[INFO]
[INFO] --- compiler:3.2:compile (default-compile) @ selenium-itnews ---
[INFO] No sources to compile
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ selenium-itnews ---
[INFO] Copying 1 resource from src/test/resources to target/test-classes
[INFO]
[INFO] --- compiler:3.2:testCompile (default-testCompile) @ selenium-itnews ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 10 source files to /Users/vuhung/eclipse-workspace/selenium-itnews/target/test-classes
[INFO]
[INFO] --- surefire:3.0.0-M5:test (default-test) @ selenium-itnews ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- jar:3.3.0:jar (default-jar) @ selenium-itnews ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /Users/vuhung/eclipse-workspace/selenium-itnews/target/selenium-itnews-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- failsafe:3.0.0-M5:integration-test (default) @ selenium-itnews ---
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.vuhung.assertj.AssertJCoreUnitTest
[ERROR] Tests run: 2, Failures: 1, Errors: 1, Skipped: 0, Time elapsed: 0.155 s <<< FAILURE! - in com.vuhung.assertj.AssertJCoreUnitTest
[ERROR] com.vuhung.assertj.AssertJCoreUnitTest.compareTwoInts  Time elapsed: 0.007 s  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<2>
    at selenium.itnews@1.0-SNAPSHOT/com.vuhung.assertj.AssertJCoreUnitTest.compareTwoInts(AssertJCoreUnitTest.java:19)

[ERROR] com.vuhung.assertj.AssertJCoreUnitTest.checkForElements  Time elapsed: 0.077 s  <<< ERROR!
java.lang.IllegalArgumentException: The array of values to look for should not be empty
    at selenium.itnews@1.0-SNAPSHOT/com.vuhung.assertj.AssertJCoreUnitTest.checkForElements(AssertJCoreUnitTest.java:29)

[INFO] Running com.vuhung.seleniium.features.login.AuthorizationStory
[main] INFO  -

-------------------------------------------------------------------------------------
     _______. _______ .______       _______ .__   __.  __  .___________.____    ____
    /       ||   ____||   _  \     |   ____||  \ |  | |  | |           |\   \  /   /
   |   (----`|  |__   |  |_)  |    |  |__   |   \|  | |  | `---|  |----` \   \/   /
    \   \    |   __|  |      /     |   __|  |  . `  | |  |     |  |       \_    _/
.----)   |   |  |____ |  |\  \----.|  |____ |  |\   | |  |     |  |         |  |
|_______/    |_______|| _| `._____||_______||__| \__| |__|     |__|         |__|

 News and tutorials at https://serenity-bdd.info
 Documentation at https://serenity-bdd.github.io
 Test Automation Training and Coaching: https://www.serenity-dojo.com
 Commercial Support: https://www.serenity-dojo.com/serenity-bdd-enterprise-support
 Join the Serenity Community on Gitter: https://gitter.im/serenity-bdd/serenity-core
-------------------------------------------------------------------------------------

[main] INFO  - Test Suite Started: Authorization story
[main] INFO  -
  _____   ___   ___   _____     ___   _____     _     ___   _____   ___   ___
 |_   _| | __| / __| |_   _|   / __| |_   _|   /_\   | _ \ |_   _| | __| |   \
   | |   | _|  \__ \   | |     \__ \   | |    / _ \  |   /   | |   | _|  | |) |
   |_|   |___| |___/   |_|     |___/   |_|   /_/ \_\ |_|_\   |_|   |___| |___/

loginInactiveUsers
--------------------------------------------------------------------------------
[main] INFO net.serenitybdd.core.webdriver.driverproviders.ChromeDriverProvider - Starting Chrome driver instance with capabilities:
[main] INFO net.serenitybdd.core.webdriver.driverproviders.ChromeDriverProvider - Capabilities {acceptInsecureCerts: false, browserName: chrome, goog:chromeOptions: {args: [remote-allow-origins=*], extensions: []}}
[main] INFO  -
  _____   ___   ___   _____     ___     _     ___   ___   ___   ___
 |_   _| | __| / __| |_   _|   | _ \   /_\   / __| / __| | __| |   \
   | |   | _|  \__ \   | |     |  _/  / _ \  \__ \ \__ \ | _|  | |) |
   |_|   |___| |___/   |_|     |_|   /_/ \_\ |___/ |___/ |___| |___/

Login inactive users
----------------------------------------------------------------------
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.96 s - in com.vuhung.seleniium.features.login.AuthorizationStory
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   AssertJCoreUnitTest.compareTwoInts:19 expected:<1> but was:<2>
[ERROR] Errors:
[ERROR]   AssertJCoreUnitTest.checkForElements:29 » IllegalArgument The array of values ...
[INFO]
[ERROR] Tests run: 3, Failures: 1, Errors: 1, Skipped: 0
[INFO]
[INFO]
[INFO] --- serenity:4.0.29:aggregate (serenity-reports) @ selenium-itnews ---
[INFO] GENERATING REPORTS FOR: /Users/vuhung/eclipse-workspace/selenium-itnews
[INFO] GENERATING REPORTS USING 32 THREADS
[INFO] GENERATING SUMMARY REPORTS...
[INFO] GENERATING REQUIREMENTS REPORTS...
[INFO] GENERATING RESULT REPORTS...
[INFO] GENERATING ERROR REPORTS...
[INFO] Test results for 1 tests generated in 3.1 secs in directory: file:/Users/vuhung/eclipse-workspace/selenium-itnews/target/site/serenity/
[INFO] ------------------------------------------------
[INFO] | SERENITY TESTS:               | SUCCESS
[INFO] ------------------------------------------------
[INFO] | Test scenarios executed       | 1
[INFO] | Total Test cases executed     | 1
[INFO] | Tests passed                  | 1
[INFO] | Tests failed                  | 0
[INFO] | Tests with errors             | 0
[INFO] | Tests compromised             | 0
[INFO] | Tests aborted                 | 0
[INFO] | Tests pending                 | 0
[INFO] | Tests ignored/skipped         | 0
[INFO] ------------------------------- | --------------
[INFO] | Total Duration| 10s 649ms
[INFO] | Fastest test took| 10s 649ms
[INFO] | Slowest test took| 10s 649ms
[INFO] ------------------------------------------------
[INFO]
[INFO] SERENITY REPORTS
[INFO]   - Full Report: file:///Users/vuhung/eclipse-workspace/selenium-itnews/target/site/serenity/index.html
[INFO]
[INFO] --- failsafe:3.0.0-M5:verify (default) @ selenium-itnews ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  24.431 s
[INFO] Finished at: 2023-12-28T15:10:34+11:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:3.0.0-M5:verify (default) on project selenium-itnews: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/vuhung/eclipse-workspace/selenium-itnews/target/failsafe-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
vhmac:selenium-itnews vuhung$
vuhung16au commented 8 months ago

Resolved.

A test case in another file caused the error.