TomEE Arquillian

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

TomEE Arquillian

ivanjunckes
Is there a way I can avoid adding classes and packages for tests and just
have everything?

It is very annoying to have to run the test each time to find out which
class I didn't add to the WebArchive.
Reply | Threaded
Open this post in threaded view
|

Re: TomEE Arquillian

ivanjunckes
Sent by mistake, missed the example.

@Deployment(testable = false)
public static WebArchive createDeployment() {
    final WebArchive webArchive = getDefault()
            .addPackage(Endereco.class.getPackage())
            .addPackage(Dao.class.getPackage())
            .addPackage(UsuarioService.class.getPackage())
            .addPackage(Usuario.class.getPackage());
    return webArchive;
}


On Wed, Mar 6, 2019 at 7:22 PM Ivan Junckes Filho <[hidden email]>
wrote:

> Is there a way I can avoid adding classes and packages for tests and just
> have everything?
>
> It is very annoying to have to run the test each time to find out which
> class I didn't add to the WebArchive.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: TomEE Arquillian

jgallimore
Ziplock is what you're after:
https://github.com/apache/tomee/tree/master/arquillian/ziplock

Here's how an example of how you use it:
https://github.com/apache/tomee/blob/master/examples/mvc-cxf-hibernate/src/test/java/org/superbiz/mvc/MvcTest.java#L56-L62
.

Enjoy :-).

Jon

On Wed, Mar 6, 2019 at 10:29 PM Ivan Junckes Filho <[hidden email]>
wrote:

> Sent by mistake, missed the example.
>
> @Deployment(testable = false)
> public static WebArchive createDeployment() {
>     final WebArchive webArchive = getDefault()
>             .addPackage(Endereco.class.getPackage())
>             .addPackage(Dao.class.getPackage())
>             .addPackage(UsuarioService.class.getPackage())
>             .addPackage(Usuario.class.getPackage());
>     return webArchive;
> }
>
>
> On Wed, Mar 6, 2019 at 7:22 PM Ivan Junckes Filho <[hidden email]>
> wrote:
>
> > Is there a way I can avoid adding classes and packages for tests and just
> > have everything?
> >
> > It is very annoying to have to run the test each time to find out which
> > class I didn't add to the WebArchive.
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: TomEE Arquillian

ivanjunckes
Thanks Jon, this works  :)

On Wed, Mar 6, 2019 at 7:39 PM Jonathan Gallimore <
[hidden email]> wrote:

> Ziplock is what you're after:
> https://github.com/apache/tomee/tree/master/arquillian/ziplock
>
> Here's how an example of how you use it:
>
> https://github.com/apache/tomee/blob/master/examples/mvc-cxf-hibernate/src/test/java/org/superbiz/mvc/MvcTest.java#L56-L62
> .
>
> Enjoy :-).
>
> Jon
>
> On Wed, Mar 6, 2019 at 10:29 PM Ivan Junckes Filho <[hidden email]>
> wrote:
>
> > Sent by mistake, missed the example.
> >
> > @Deployment(testable = false)
> > public static WebArchive createDeployment() {
> >     final WebArchive webArchive = getDefault()
> >             .addPackage(Endereco.class.getPackage())
> >             .addPackage(Dao.class.getPackage())
> >             .addPackage(UsuarioService.class.getPackage())
> >             .addPackage(Usuario.class.getPackage());
> >     return webArchive;
> > }
> >
> >
> > On Wed, Mar 6, 2019 at 7:22 PM Ivan Junckes Filho <[hidden email]
> >
> > wrote:
> >
> > > Is there a way I can avoid adding classes and packages for tests and
> just
> > > have everything?
> > >
> > > It is very annoying to have to run the test each time to find out which
> > > class I didn't add to the WebArchive.
> > >
> > >
> >
>