maven - How can I import robot-file from external java library? -
i use java + robot framework test micro services. have created several test projects each service. testing create few java classes keywords work http , json on low level. separated these classes library plan add test project maven dependency.
also want add common keywords robot-file external library.
but problem cannot import robot-files in tests.
please pay attention first picture external project, , second picture project tests.
does faced such problem , if decision have come with?
i managed apply hack maven plugins. copy resources in current project.
<build> … <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-dependency-plugin</artifactid> <executions> <execution> <id>unpack</id> <phase>prepare-package</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactitems> <artifactitem> <groupid>prototype-apitesting</groupid> <artifactid>apitesting</artifactid> <version>${acceptence.test.library.version}</version> <type>jar</type> <includes>com.robot.common/*</includes> <outputdirectory>${basedir}/src/main/resources</outputdirectory> </artifactitem> </artifactitems> </configuration> </execution> </executions> </plugin> </plugins> </build>
structure of external library
├── java │ └── com │ └── robot │ └── sample │ └── keywords │ └── apitestingkeywords.java └── resources └── com.robot.common ├── config.robot ├── httpassertions.robot └── keywords ├── accountserviceskeywords.robot └── sessionserviceskeywords.robot
Comments
Post a Comment