Here, in fact, a small project of three tests in Selenium WebDriver + JUnit.

https://github.com/Raindropslolz/TestDemo/tree/master/beheroik

The project was created through maven.

There was a question about how to run the whole thing through the console. Before that, I didn’t have to do anything like that, so I don’t even know where to start. I would be grateful for the help.

  • 1) the link is not working. 2) mvn clean install test will run, crash and run tests - Senior Pomidor
  • Link corrected. Do you need to go to the test directory before executing the command? For example, there are project files with the extension .java. C:\ IdeaProjects\ ProjectName \ src \ test \ and from here to call your team? - Pavel Bobrov

1 answer 1

You do not have enough instructions in the POM file for the build.

You need to add. maven-compiler-plugin to your pom.xml

 <project> .... <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.8</source> <target>1.8</target> <encoding>UTF-8</encoding> </configuration> </plugin> </plugins> </pluginManagement> </build> .... </project> 

further from the directory where pom.xml is located execute mvn clean install test

  • 4 hours smoked all these your Internet but the solution never found. They answered in 5 minutes. Can I kiss you? - Pavel Bobrov
  • @PavelBobrov sorry, I'm a man. not allowed - Senior Pomidor
  • @ SeniorPomidor, but do not tell me how to interrupt the execution of tests. running this way? What you need to close, what process to interrupt? Or maybe some other way? - Pavel Bobrov
  • Ctrl + C interrupts the process - Senior Pomidor
  • Good day :) And do not tell me one more thing? I run the tests with the mvn clean test site command, and then create a report with the mvn allure: serve command. Is it possible to somehow combine this into one team? - Pavel Bobrov