[arquillian-issues] [JBoss JIRA] (ARQ-705) @ShouldThrowException() - if expected deployment exception is not raised it will stop to invoke other deployments and any tests aren't processed at all

Aslak Knutsen (Commented) (JIRA) jira-events at lists.jboss.org
Mon Dec 19 10:07:09 EST 2011


    [ https://issues.jboss.org/browse/ARQ-705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651990#comment-12651990 ] 

Aslak Knutsen commented on ARQ-705:
-----------------------------------

hmm, you could always deploy them manually using the @ArquillianResource Deployer dpeloyer;


{code}
@RunWith(Arquillian.class)
public class ImagineTestCase {

  @Deployment(name="dep1", managed = false) @ShouldThrowException(Exception.class)
  public static Archive<?> dep1() { ... }


  @Deployment(name="dep2", managed = false)
  public static Archive<?> dep2() { ... }

  @ArquillianResource
  private Deployer deployer;

  @Test @RunAsClient
  public void Test1() throws Exception {
    deployer.deploy("dep1")
  }


  @Test @RunAsClient
  public void Test2() throws Exception {
    deployer.deploy("dep2")
  }

{code}
                
> @ShouldThrowException() - if expected deployment exception is not raised it will stop to invoke other deployments and any tests aren't processed at all
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARQ-705
>                 URL: https://issues.jboss.org/browse/ARQ-705
>             Project: Arquillian
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: Pavel Janousek
>
> Let imagine class like:{code}
> @RunWith(Arquillian.class)
> public class ImagineTestCase {
>   @Deployment(name="dep1")
>   @ShouldThrowException(Exception.class)
>   public static Archive<?> dep1() { ... }
>   @Deployment(name="dep2")
>   public static Archive<?> dep2() { ... }
>   @Test
>   @OperateOnDeployment("dep1")
>   public void Test1() throws Exception { ... }
>   @Test
>   @OperateOnDeployment("dep2")
>   public void Test2() throws Exception { ... }
> }
> {code}
> Present behavior - if exception isn't raised during deployment dep1 (and this is also the first deployment ARQ want to run), everything other is stopped, although deployment dep2 could work ok and Test2() depends only on dep2.
> It doesn't make sense for me, I prefer to continue run some tests if anyone is available and isn't blocked by failed deployment -> try to run dep2(), deploy produced artifact and invoke Test2, even dep1() failed (not raised Exception in this case).
> Do you agree with me?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the arquillian-issues mailing list