Показаны сообщения с ярлыком Blogs in english. Показать все сообщения
Показаны сообщения с ярлыком Blogs in english. Показать все сообщения

пятница, 15 марта 2013 г.

Maven: specify folder for jars

Sometimes you need to download jars, which were in your "dependencies" block into specified directory.
For this task you may use this approach: in "plugins" part of your pom.xml add such block:


<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


This will copy all jars into target/lib folder after run command : mvn generate-sources
If you want to specify directory from command line, you can do such thing:

среда, 20 февраля 2013 г.

SoapUI - the best ways of test projects integration.


I want to talk about some problem I encountered with while I created some tests with SoapUI tool.
The problem was - when we want to use some tests modules , which was developed by another person also with SoapUI - we often do the following:
1)Import someone's test suite to our project
2)use "Run TestCase" step for executing of test cases of someone's suite.
This is the standard way of integration of several test projects in SoapUI.
But. What will happened if this "someone" modified his test suite? Your imported test suite now doesn't work.
After that you will try to do the following:
1)get new version of "someone's" test suite and import it instead of old version.
After run of modified tests - you will get an exception, because SoapUi saved dependency to old version of "someone's" test suite and "doesn't understand" the new version of this suite.
I hope I well described the problem. Now I want to describe good(in my opinion) way to solve this problem.

First.
When you are writing your tests and you know that you will use someone's modules(in SoapUI terminology - this means - Test Suites), the better way is NOT to use "Run TestCase" from your tests. The better way is described on the image below: