Answer the question
In order to leave comments, you need to log in
How to create an executable using maven java project in Intellij idea and of course selenium and testng?
.jar file I create maven projects-> lifecycle-> install by double click.
In connection with the use of different options described in the internet, I received different errors.
How to make links correctly (or it can be done differently) and get an executable file as a result,
after it has worked, get a report with test results, and also set test execution priorities.
Many different options are described, but somehow none of them worked. Help me figure out what I missed and how to do it right,
judging by how many similar questions I have met without an answer, this is quite relevant.
Answer the question
In order to leave comments, you need to log in
You should use package, not install:
install is executed after the package is built. Install puts the file in the local repository.
Thank you. But the problem was not solved.
Project structure.
In the folder "main" I have a page factory, and in the folder "test" the tests themselves
My POM:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>1</groupId>
<artifactId>11</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
</plugins>
</build>
<dependencies>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/postgresql/postgresql -->
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901.jdbc4</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
</dependency>
</dependencies>
</project>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question