Fundamental question about Arquillian
vicky.sharma Jun 16, 2011 1:42 PM
public double convertToCelsius(double f) {
System.out.println("@@@@@@@@@@Inside container: convertToCelsius");
return ((f - 32) * 5 / 9);
}
public double convertToFarenheit(double c) {
System.out.println("@@@@@@@@@@Inside container: convertToFarenheit");
return ((c * 9 / 5) + 32);
}
I also added some log messages to my Test class:
@Test
public void testConvertToCelsius() {
System.out.println("@@@@@@@@@Inside Junit client");
Assert.assertEquals(converter.convertToCelsius(32d), 0d);
Assert.assertEquals(converter.convertToCelsius(212d), 100d);
}
Now I started JBoss AS and run the test cases through command line by typing: mvn test -Pjbossas-remote-6
I was thinking that log messages that I added in Bean class will be printed on JBoss console, and the log messages that I added in my Test class will be printed on Maven console window, because these two things are running in separate VM.
However that did not happen, and I saw all the log messages are getting printed on JBoss AS console.
That means, my Test cases are running inside JBoss AS container along with the Bean class.
If this is true, then where is remoteness here? I mean, both the test case and bean are running inside same JVM. This is similar to "embedded container" behaviour, isn't?
I'm referring this explanation:
a remote container resides in a separate JVM from the test runner; Arquillian binds to the container to deploy and undeploy the test archive and invokes tests via a remote protocol (typically HTTP)
But in this case, it appears Arquillian is placing my Test cases along with Bean class in same JVM.
Let me know, if my question is not clear?