We want to integrate Selenium testing into our maven build process. Fortunately, there is a ton of information on how to do this, but it's hard for me to figure out how to deal with one of our requirements.
To separate our testing levels, we want to use breadboard service objects for ui tests. All of these objects are already defined in the Spring configuration files that we use in unit tests. Posting these services is easy in the unit test (we use @ContextConfiguration), but I don’t know how to handle this configuration swap when we deploy the Jetty test warfare for Selenium.
We use:
: ///. mocks . , , , . ...
: Spring:
<import resource="services-${env}.xml"/>
${env} pom.xml:
pom.xml
<properties> <env>prd</env> <!-- or test depending on build profile --> </properties>
.
. Maven - . (services-prd.xml services-test.xml) beans ( / ), , , .
services-prd.xml
services-test.xml
(IMHO): , AOP + JMX . ( JMX), mocks. .