-
1. Re: Splitting tests across multiple files without causing redeployment per file
kwintesencja Sep 1, 2014 9:41 AM (in response to andrew10961)Hi andrew,
there is an issue about that on arquillian jira, you can follow it here: [ARQ-197] Research support for @Deployment on multiple levels - JBoss Issue Tracker
for now if you use testable = true deployments you use CDI injection among tests to leverage same deployment, see an example here.
You still can try suite extension: ingwarsw/arquillian-suite-extension · GitHub but dont know if its released yet or if it will be compatible with A|RQ-197
i hope that helps.
-
2. Re: Splitting tests across multiple files without causing redeployment per file
andrew10961 Sep 1, 2014 10:31 AM (in response to kwintesencja)Rafael, thanks, let me try a little further.
Do you think I'm being hampered by only running with 1.0.3 ? I'm
struggling to override the contents of my JBoss BOM which limits me to
this..
Andrew
On Mon, Sep 1, 2014 at 3:42 PM, Rafael Pestano <do-not-reply@jboss.com>
-
3. Re: Re: Splitting tests across multiple files without causing redeployment per file
kwintesencja Sep 1, 2014 1:59 PM (in response to andrew10961)Hi, i still coudnt reach you(maybe because i'm out of caffeine here) but i didnt get the the relation between the phrases below:
Is there any advice on how to create a large number of tests across multiple files that collectively only require a single deployment?
and
My JBoss BOM seems to contain Arquillian 1.0.3.Final.
my answer refers to first quote.
If you have an example maybe i can help you
-
4. Re: Re: Splitting tests across multiple files without causing redeployment per file
andrew10961 Sep 2, 2014 4:07 AM (in response to kwintesencja)Hi Rafael thanks for following up.
No real connection between the two that I'm aware of; I just wondered if
requiring multiple deployments was a known issue, and whether later
versions of Arquillian help (I've seen 1.1.5.Final around).
I have a solution that works at the moment.. but it's verbose, ugly, and
won't work forever.
TestBase.java
- defines the shrinkwrap web archive using @deployment
- a test client which references the value of a deploymentURL injected
using @ArquillianResource
RestTest
- extends TestBase (mainly for reasons of tidiness, could be combined with
TestBase)
- lists each of the test methods annotated using @test, and @RunAsClient,
and order
- each test method contains a single line that invokes tests whose logic is
actually defined elsewhere, in static methods across a large number of files
- at each invocation, a test client is generated using a method on
TestBase.java which has access to the deployment url.
This runs a large number of @RunAsClient tests, across a number of files,
in a specific order, within a single deployment.
However, it will soon become unwieldy too.
What I would really like:
- a single deployment of the archive for all tests
- RunAsClient tests using this deployment split across multiple classes,
ideally echoing the package structure of the classes under test.
- the ability to inject the archive's deployment URL into test classes
On Mon, Sep 1, 2014 at 7:59 PM, Rafael Pestano <do-not-reply@jboss.com>