Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introductory example in Chapter 03: Does it really work? #113

Open
robertpanzer opened this issue Feb 26, 2014 · 3 comments
Open

Introductory example in Chapter 03: Does it really work? #113

robertpanzer opened this issue Feb 26, 2014 · 3 comments

Comments

@robertpanzer
Copy link

The introductory Arquillian example in Chapter 03 uses a remote JBoss container.
The test case deploys the war file built from the main java resources that probably do not contain the test case:

[source,java]

@Deployment
public static WebArchive createDeployment() {
    return ShrinkWrap.createFromZipFile(WebArchive.class, new File(
            "target/feedback.war"));
}

As the test case assumes to be running in the container I guess that the test case will not run due to the missing class in the Deployment.

Or is there something I have overseen?

Kind regards,
Robert

@ALRubinger
Copy link
Member

Arquillian will slyly add the test case into the WebArchive before it's
deployed; you'll never really see us adding the test case itself (or its
dependencies) in manually. :)

@robertpanzer
Copy link
Author

OK, you're right.
Just reproduced it:
It works when testing a WAR, the test class is automatically added to WEB-INF/classes.
But it is not added to an EAR.
(That's what I am always working on, so that's why this made me wonder)

@robertpanzer
Copy link
Author

@ALRubinger At least in chapter 05 the test class is added to the deployment ;-)

public static WebArchive deploy() {
    return ShrinkWrap.create(WebArchive.class)
        .addAsLibraries(
            ConferenceDeployments.conference().addClasses(
              ConferenceTestCase.class,

Maybe it's worth spending a note on this.

@robertpanzer robertpanzer reopened this Feb 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants