• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JUnit Testing of Rest Web Service without starting tomcat explicitly

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm working on designing Junit framework which requires

# Run Junit test cases even without starting tomcat (use something like embedded tomcat)

I'm making use of Jersey test framework.
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-servlet</artifactId>
<version>${jersey2.version}</version>
</dependency>

Starting tomcat in background in @Before method of suite

server = GrizzlyHttpServerFactory.createHttpServer(BASE_URI, rc);
server.start();

And stop tomcat when testing is completed.

This work successfully. I don't have to start tomcat explicitly. Embedded tomcat is started when Junit suite starts and stops after completing test suite.

I'm thinking of rest assured test framework instead of Jersey test framework.

But I did not find information of background tomcat with rest assured framework.

Any help would be great!

Thanks, Sachin

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic