Cloud + data orchestration: Demolish your data silos. Enable complex analytics. Eliminate I/O bottlenecks. Learn the essentials (and more)!
2024 DZone Community Survey: SMEs wanted! Help shape the future of DZone. Share your insights and enter to win swag!
Spring Data Engineer at Pivotal Software, Inc.
I'm a Software Craftsman, Spring Data Engineer at Pivotal, a member of the CDI 2.0 expert group, and Lead of the lettuce Redis driver. I’m developing Java server-, frontend-, and web applications since 1999 and my focus is now on software architecture and Spring and Redis clients. I contribute to several open source projects in my free time.
Stats
Reputation: | 226 |
Pageviews: | 388.2K |
Articles: | 1 |
Comments: | 11 |
Comments
Mar 13, 2015 · Stephen Chin
Hi Charlie,
you're right. Possible is everything and for sure better than testing after deployment. I'm a fan of fast and simple, therefore, this approach. Using Jersey as in-memory HTTP server is as simple as RESTEasy.
Running jetty/tomcat/wildfly using Maven requires you to change the context in a certain manner. This context change might seem not much, yet it is there. My other point is, your jetty/tomcat/wildfly needs to start up, needs to deploy, and has to shut down (which takes a couple of seconds).
Maven with jetty/tomcat/wildfly takes at least 10x to 20x more time than isolated testing with the in-memory example, and the deployment contains more classes than you need for your test. The use of Mockito (or other mock frameworks) requires Arquillian or something similar. On the other hand, if you start your jetty/tomcat/wildfly once it might be overall faster than starting/stopping a HTTP in-memory server for each unit test case.
Best regards, Mark
Mar 13, 2015 · Stephen Chin
Hi Charlie,
you're right. Possible is everything and for sure better than testing after deployment. I'm a fan of fast and simple, therefore, this approach. Using Jersey as in-memory HTTP server is as simple as RESTEasy.
Running jetty/tomcat/wildfly using Maven requires you to change the context in a certain manner. This context change might seem not much, yet it is there. My other point is, your jetty/tomcat/wildfly needs to start up, needs to deploy, and has to shut down (which takes a couple of seconds).
Maven with jetty/tomcat/wildfly takes at least 10x to 20x more time than isolated testing with the in-memory example, and the deployment contains more classes than you need for your test. The use of Mockito (or other mock frameworks) requires Arquillian or something similar. On the other hand, if you start your jetty/tomcat/wildfly once it might be overall faster than starting/stopping a HTTP in-memory server for each unit test case.
Best regards, Mark
Mar 13, 2015 · Stephen Chin
Hi Charlie,
you're right. Possible is everything and for sure better than testing after deployment. I'm a fan of fast and simple, therefore, this approach. Using Jersey as in-memory HTTP server is as simple as RESTEasy.
Running jetty/tomcat/wildfly using Maven requires you to change the context in a certain manner. This context change might seem not much, yet it is there. My other point is, your jetty/tomcat/wildfly needs to start up, needs to deploy, and has to shut down (which takes a couple of seconds).
Maven with jetty/tomcat/wildfly takes at least 10x to 20x more time than isolated testing with the in-memory example, and the deployment contains more classes than you need for your test. The use of Mockito (or other mock frameworks) requires Arquillian or something similar. On the other hand, if you start your jetty/tomcat/wildfly once it might be overall faster than starting/stopping a HTTP in-memory server for each unit test case.
Best regards, Mark
Mar 13, 2015 · Stephen Chin
Hi Charlie,
you're right. Possible is everything and for sure better than testing after deployment. I'm a fan of fast and simple, therefore, this approach. Using Jersey as in-memory HTTP server is as simple as RESTEasy.
Running jetty/tomcat/wildfly using Maven requires you to change the context in a certain manner. This context change might seem not much, yet it is there. My other point is, your jetty/tomcat/wildfly needs to start up, needs to deploy, and has to shut down (which takes a couple of seconds).
Maven with jetty/tomcat/wildfly takes at least 10x to 20x more time than isolated testing with the in-memory example, and the deployment contains more classes than you need for your test. The use of Mockito (or other mock frameworks) requires Arquillian or something similar. On the other hand, if you start your jetty/tomcat/wildfly once it might be overall faster than starting/stopping a HTTP in-memory server for each unit test case.
Best regards, Mark
Mar 13, 2015 · Mark Paluch
Hi Charlie,
you're right. Possible is everything and for sure better than testing after deployment. I'm a fan of fast and simple, therefore, this approach. Using Jersey as in-memory HTTP server is as simple as RESTEasy.
Running jetty/tomcat/wildfly using Maven requires you to change the context in a certain manner. This context change might seem not much, yet it is there. My other point is, your jetty/tomcat/wildfly needs to start up, needs to deploy, and has to shut down (which takes a couple of seconds).
Maven with jetty/tomcat/wildfly takes at least 10x to 20x more time than isolated testing with the in-memory example, and the deployment contains more classes than you need for your test. The use of Mockito (or other mock frameworks) requires Arquillian or something similar. On the other hand, if you start your jetty/tomcat/wildfly once it might be overall faster than starting/stopping a HTTP in-memory server for each unit test case.
Best regards, Mark
Mar 13, 2015 · Mark Paluch
Hi Charlie,
you're right. Possible is everything and for sure better than testing after deployment. I'm a fan of fast and simple, therefore, this approach. Using Jersey as in-memory HTTP server is as simple as RESTEasy.
Running jetty/tomcat/wildfly using Maven requires you to change the context in a certain manner. This context change might seem not much, yet it is there. My other point is, your jetty/tomcat/wildfly needs to start up, needs to deploy, and has to shut down (which takes a couple of seconds).
Maven with jetty/tomcat/wildfly takes at least 10x to 20x more time than isolated testing with the in-memory example, and the deployment contains more classes than you need for your test. The use of Mockito (or other mock frameworks) requires Arquillian or something similar. On the other hand, if you start your jetty/tomcat/wildfly once it might be overall faster than starting/stopping a HTTP in-memory server for each unit test case.
Best regards, Mark
Mar 13, 2015 · Mark Paluch
Hi Charlie,
you're right. Possible is everything and for sure better than testing after deployment. I'm a fan of fast and simple, therefore, this approach. Using Jersey as in-memory HTTP server is as simple as RESTEasy.
Running jetty/tomcat/wildfly using Maven requires you to change the context in a certain manner. This context change might seem not much, yet it is there. My other point is, your jetty/tomcat/wildfly needs to start up, needs to deploy, and has to shut down (which takes a couple of seconds).
Maven with jetty/tomcat/wildfly takes at least 10x to 20x more time than isolated testing with the in-memory example, and the deployment contains more classes than you need for your test. The use of Mockito (or other mock frameworks) requires Arquillian or something similar. On the other hand, if you start your jetty/tomcat/wildfly once it might be overall faster than starting/stopping a HTTP in-memory server for each unit test case.
Best regards, Mark
Mar 13, 2015 · Mark Paluch
Hi Charlie,
you're right. Possible is everything and for sure better than testing after deployment. I'm a fan of fast and simple, therefore, this approach. Using Jersey as in-memory HTTP server is as simple as RESTEasy.
Running jetty/tomcat/wildfly using Maven requires you to change the context in a certain manner. This context change might seem not much, yet it is there. My other point is, your jetty/tomcat/wildfly needs to start up, needs to deploy, and has to shut down (which takes a couple of seconds).
Maven with jetty/tomcat/wildfly takes at least 10x to 20x more time than isolated testing with the in-memory example, and the deployment contains more classes than you need for your test. The use of Mockito (or other mock frameworks) requires Arquillian or something similar. On the other hand, if you start your jetty/tomcat/wildfly once it might be overall faster than starting/stopping a HTTP in-memory server for each unit test case.
Best regards, Mark
Aug 15, 2014 · Mark Paluch
Jun 04, 2014 · Mark Paluch
Jun 04, 2014 · Mark Paluch