[JBoss JIRA] (ARQ-181) When using @Test expected exception, the internal state of the TestResult is unknown - JUnit
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-181?page=com.atlassian.jira.plugin.sy... ]
Aslak Knutsen reassigned ARQ-181:
---------------------------------
Assignee: Aslak Knutsen
> When using @Test expected exception, the internal state of the TestResult is unknown - JUnit
> --------------------------------------------------------------------------------------------
>
> Key: ARQ-181
> URL: https://issues.jboss.org/browse/ARQ-181
> Project: Arquillian
> Issue Type: Bug
> Components: Test Harness Integration
> Reporter: Aslak Knutsen
> Assignee: Aslak Knutsen
> Priority: Minor
> Fix For: 1.1.5.Final
>
>
> When using the ExpectedException feature in the TestFrameworks the internal TestResult object in Arquillian is in an unknown state. Arquillian catches the thrown exception, but the actual validation of it is done in the test framework after Arquillian is done with the test invocation. Arquillian can only know that a Exception has been thrown, but not if it is expected or not.
> JUnit
> @Test(expected=Exception.class)
> TestNG
> @Test(expectedException=Exception.class)
> @ExpectedException(Exception.class)
> Follow up with TestNG and JUnit to see how this can be done..
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 9 months
[JBoss JIRA] (ARQ-1804) When using @Test expected exception, the internal state of the TestResult is unknown - TestNG
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1804?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen updated ARQ-1804:
-------------------------------
Fix Version/s: (was: 1.1.5.Final)
> When using @Test expected exception, the internal state of the TestResult is unknown - TestNG
> ---------------------------------------------------------------------------------------------
>
> Key: ARQ-1804
> URL: https://issues.jboss.org/browse/ARQ-1804
> Project: Arquillian
> Issue Type: Bug
> Components: Test Harness Integration
> Reporter: Aslak Knutsen
> Priority: Minor
>
> When using the ExpectedException feature in the TestFrameworks the internal TestResult object in Arquillian is in an unknown state. Arquillian catches the thrown exception, but the actual validation of it is done in the test framework after Arquillian is done with the test invocation. Arquillian can only know that a Exception has been thrown, but not if it is expected or not.
> TestNG
> @Test(expectedException=Exception.class)
> @ExpectedException(Exception.class)
> Follow up with TestNG to see how this can be done..
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 9 months
[JBoss JIRA] (ARQ-1804) When using @Test expected exception, the internal state of the TestResult is unknown - TestNG
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1804?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen updated ARQ-1804:
-------------------------------
Description:
When using the ExpectedException feature in the TestFrameworks the internal TestResult object in Arquillian is in an unknown state. Arquillian catches the thrown exception, but the actual validation of it is done in the test framework after Arquillian is done with the test invocation. Arquillian can only know that a Exception has been thrown, but not if it is expected or not.
TestNG
@Test(expectedException=Exception.class)
@ExpectedException(Exception.class)
Follow up with TestNG to see how this can be done..
was:
When using the ExpectedException feature in the TestFrameworks the internal TestResult object in Arquillian is in an unknown state. Arquillian catches the thrown exception, but the actual validation of it is done in the test framework after Arquillian is done with the test invocation. Arquillian can only know that a Exception has been thrown, but not if it is expected or not.
JUnit
@Test(expected=Exception.class)
TestNG
@Test(expectedException=Exception.class)
@ExpectedException(Exception.class)
Follow up with TestNG and JUnit to see how this can be done..
> When using @Test expected exception, the internal state of the TestResult is unknown - TestNG
> ---------------------------------------------------------------------------------------------
>
> Key: ARQ-1804
> URL: https://issues.jboss.org/browse/ARQ-1804
> Project: Arquillian
> Issue Type: Bug
> Components: Test Harness Integration
> Reporter: Aslak Knutsen
> Priority: Minor
> Fix For: 1.1.5.Final
>
>
> When using the ExpectedException feature in the TestFrameworks the internal TestResult object in Arquillian is in an unknown state. Arquillian catches the thrown exception, but the actual validation of it is done in the test framework after Arquillian is done with the test invocation. Arquillian can only know that a Exception has been thrown, but not if it is expected or not.
> TestNG
> @Test(expectedException=Exception.class)
> @ExpectedException(Exception.class)
> Follow up with TestNG to see how this can be done..
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 9 months
[JBoss JIRA] (ARQ-1804) When using @Test expected exception, the internal state of the TestResult is unknown - TestNG
by Aslak Knutsen (JIRA)
Aslak Knutsen created ARQ-1804:
----------------------------------
Summary: When using @Test expected exception, the internal state of the TestResult is unknown - TestNG
Key: ARQ-1804
URL: https://issues.jboss.org/browse/ARQ-1804
Project: Arquillian
Issue Type: Bug
Components: Test Harness Integration
Reporter: Aslak Knutsen
Priority: Minor
Fix For: 1.1.5.Final
When using the ExpectedException feature in the TestFrameworks the internal TestResult object in Arquillian is in an unknown state. Arquillian catches the thrown exception, but the actual validation of it is done in the test framework after Arquillian is done with the test invocation. Arquillian can only know that a Exception has been thrown, but not if it is expected or not.
JUnit
@Test(expected=Exception.class)
TestNG
@Test(expectedException=Exception.class)
@ExpectedException(Exception.class)
Follow up with TestNG and JUnit to see how this can be done..
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 9 months
[JBoss JIRA] (ARQ-286) Should support JUnit @Rules
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-286?page=com.atlassian.jira.plugin.sy... ]
Aslak Knutsen commented on ARQ-286:
-----------------------------------
The client side doesn't fail, as far as Rule support it works just fine. :)
You're talking about this ARQ-181 which is a separate issue and not related to Rules only. Working on that as we speak. Got it working for either incontainer or runasclient atm, but struggling with both. :)
> Should support JUnit @Rules
> ---------------------------
>
> Key: ARQ-286
> URL: https://issues.jboss.org/browse/ARQ-286
> Project: Arquillian
> Issue Type: Feature Request
> Components: Test Harness Integration
> Reporter: Aslak Knutsen
> Assignee: Aslak Knutsen
> Fix For: 1.1.5.Final
>
>
> Using the JUnit feature @Rule becomes a problem when running against Remote servers since the @Rule is executed both on the Client and Container side.
> It works fine in Embedded Containers since the Test is executed in the same VM, but if the Rule is dependent on Container features, the @Test will fail.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 9 months
[JBoss JIRA] (ARQ-1741) Injector might throw unchecked TypeNotPresentException
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1741?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen commented on ARQ-1741:
------------------------------------
Are you trying to handle a TypeNotPresentException?
> Injector might throw unchecked TypeNotPresentException
> ------------------------------------------------------
>
> Key: ARQ-1741
> URL: https://issues.jboss.org/browse/ARQ-1741
> Project: Arquillian
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Base Implementation
> Affects Versions: 1.1.4.Final
> Reporter: Karel Piwko
> Priority: Minor
>
> *When*:
> I call Injector.get().inject()
> *And*:
> Service to be injected is not on classpath
> *Then*:
> Arquillian throws TypeNotPresentException. This is fine, however it should be in API so when looking into code this is more obvious.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 9 months
[JBoss JIRA] (ARQ-286) Should support JUnit @Rules
by Stefan Miklosovic (JIRA)
[ https://issues.jboss.org/browse/ARQ-286?page=com.atlassian.jira.plugin.sy... ]
Stefan Miklosovic edited comment on ARQ-286 at 6/23/14 5:54 AM:
----------------------------------------------------------------
It seems to me that it is still failing in RunAsClient scenario. Consider this:
{code}
@RunWith(Arquillian.class)
@RunAsClient
public class TestCase
{
@Rule
public ExpectedException e = ExpectedException.none();
@Test
public void test()
{
e.expect(RuntimeException.class)
throw new RuntimeException();
}
}
{code}
Observing org.jboss.arquillian.test.spi.event.suite.After and org.jboss.arquillian.test.spi.TestResult still tells me that result.getStatus() == Status.FAILED is true.
I am using
{code}
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
{code}
in the test project.
Should I file related jira or client mode was not treated yet?
Thanks
was (Author: smikloso):
It seems to me that it is still failing in RunAsClient scenario. Consider this:
{code}
@RunWith(Arquillian.class)
@RunAsClient
public class TestCase
{
@Rule
public ExpectedException e = ExpectedException.none();
@Test
public void test()
{
e.expect(RuntimeException.class)
throw new RuntimeException();
}
}
{code}
Observing org.jboss.arquillian.test.spi.event.suite.After and org.jboss.arquillian.test.spi.event.suite.After still tells me that result.getStatus() == Status.FAILED is true.
Should I file related jira or client mode was not treated yet?
Thanks
> Should support JUnit @Rules
> ---------------------------
>
> Key: ARQ-286
> URL: https://issues.jboss.org/browse/ARQ-286
> Project: Arquillian
> Issue Type: Feature Request
> Components: Test Harness Integration
> Reporter: Aslak Knutsen
> Assignee: Aslak Knutsen
> Fix For: 1.1.5.Final
>
>
> Using the JUnit feature @Rule becomes a problem when running against Remote servers since the @Rule is executed both on the Client and Container side.
> It works fine in Embedded Containers since the Test is executed in the same VM, but if the Rule is dependent on Container features, the @Test will fail.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 9 months
[JBoss JIRA] (ARQ-286) Should support JUnit @Rules
by Stefan Miklosovic (JIRA)
[ https://issues.jboss.org/browse/ARQ-286?page=com.atlassian.jira.plugin.sy... ]
Stefan Miklosovic commented on ARQ-286:
---------------------------------------
It seems to me that it is still failing in RunAsClient scenario. Consider this:
{code}
@RunWith(Arquillian.class)
@RunAsClient
public class TestCase
{
@Rule
public ExpectedException e = ExpectedException.none();
@Test
public void test()
{
e.expect(RuntimeException.class)
throw new RuntimeException();
}
}
{code}
Observing org.jboss.arquillian.test.spi.event.suite.After and org.jboss.arquillian.test.spi.event.suite.After still tells me that result.getStatus() == Status.FAILED is true.
Should I file related jira or client mode was not treated yet?
Thanks
> Should support JUnit @Rules
> ---------------------------
>
> Key: ARQ-286
> URL: https://issues.jboss.org/browse/ARQ-286
> Project: Arquillian
> Issue Type: Feature Request
> Components: Test Harness Integration
> Reporter: Aslak Knutsen
> Assignee: Aslak Knutsen
> Fix For: 1.1.5.Final
>
>
> Using the JUnit feature @Rule becomes a problem when running against Remote servers since the @Rule is executed both on the Client and Container side.
> It works fine in Embedded Containers since the Test is executed in the same VM, but if the Rule is dependent on Container features, the @Test will fail.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 9 months