0
0
Selenium Javatesting~10 mins

Running tests via Maven in Selenium Java - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to run tests using Maven's default test phase.

Selenium Java
mvn [1]
Drag options to blanks, or click blank then click option'
Ainstall
Btest
Cpackage
Dcompile
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'compile' runs only compilation, not tests.
Using 'package' or 'install' runs later phases but not just tests.
2fill in blank
medium

Complete the command to run tests with Maven and skip compiling.

Selenium Java
mvn [1] -DskipCompile=true
Drag options to blanks, or click blank then click option'
Apackage
Binstall
Cverify
Dtest
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'package' or 'install' runs more than tests.
Skipping compile without running tests won't test code.
3fill in blank
hard

Fix the error in the Maven command to run tests with a specific test class.

Selenium Java
mvn test -Dtest=[1]
Drag options to blanks, or click blank then click option'
AMyTestClass.java
Bmytestclass
CMyTestClass
DTestMyClass
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase or wrong case for class name.
Including file extensions in the test name.
4fill in blank
hard

Fill both blanks to run tests and generate a report in XML format.

Selenium Java
mvn [1] [2]
Drag options to blanks, or click blank then click option'
Atest
B-Dsurefire.reportFormat=xml
C-Dsurefire.reportFormat=html
Dclean
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'clean' instead of 'test' to run tests.
Choosing HTML report format when XML is requested.
5fill in blank
hard

Fill all three blanks to clean, compile, and run tests with Maven.

Selenium Java
mvn [1] [2] [3]
Drag options to blanks, or click blank then click option'
Aclean
Bcompile
Ctest
Dinstall
Attempts:
3 left
💡 Hint
Common Mistakes
Running 'install' instead of 'test' to run tests.
Skipping 'clean' may cause stale files.