New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non RESTX server in spec tests #11

Open
xhanin opened this Issue May 13, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@xhanin
Contributor

xhanin commented May 13, 2013

The RESTX spec test feature could be interesting to test any REST API, as it works at HTTP level.

It would only require to avoid launching a server, and be provided with a base URL when setting up the test.

@jvelo

This comment has been minimized.

Show comment
Hide comment
@jvelo

jvelo Oct 10, 2013

I'm interested in this feature and willing to help to the extend I can (I have dropwizard in mind as a target platform).

jvelo commented Oct 10, 2013

I'm interested in this feature and willing to help to the extend I can (I have dropwizard in mind as a target platform).

@xhanin

This comment has been minimized.

Show comment
Hide comment
@xhanin

xhanin Oct 11, 2013

Contributor

Nice, this shouldn't be very complex to implement at least for the when /
then part. The given part maybe more complex.

You can have a look at how this is implemented by looking at these classes:

https://github.com/restx/restx/blob/master/restx-specs-tests/src/main/java/restx/tests/RestxSpecRule.java
https://github.com/restx/restx/blob/master/restx-specs-tests/src/main/java/restx/tests/RestxServerRule.java

The server rule is responsible for starting up and shutting down the
server, which is probably too specific to restx. The bad thing is that spec
rule extends server rule, but maybe this could be reviewed to use
encapsulation/delegation instead to make it more pluggable and less restx
dependent.

I won't have much time to devote to that myself but I'd be happy to review
a PR :)

On Thu, Oct 10, 2013 at 12:46 PM, Jerome Velociter <notifications@github.com

wrote:

I'm interested in this feature and willing to help to the extend I can (I
have dropwizard in mind as a target platform).


Reply to this email directly or view it on GitHubhttps://github.com/restx/restx/issues/11#issuecomment-26043752
.

Xavier Hanin
Lead architect at 4SH France - http://www.4sh.fr/
RESTX creator and lead developer - http://restx.io/
BordeauxJUG creator - http://www.bordeauxjug.org/
Apache Ivy Creator - http://ant.apache.org/ivy/

Contributor

xhanin commented Oct 11, 2013

Nice, this shouldn't be very complex to implement at least for the when /
then part. The given part maybe more complex.

You can have a look at how this is implemented by looking at these classes:

https://github.com/restx/restx/blob/master/restx-specs-tests/src/main/java/restx/tests/RestxSpecRule.java
https://github.com/restx/restx/blob/master/restx-specs-tests/src/main/java/restx/tests/RestxServerRule.java

The server rule is responsible for starting up and shutting down the
server, which is probably too specific to restx. The bad thing is that spec
rule extends server rule, but maybe this could be reviewed to use
encapsulation/delegation instead to make it more pluggable and less restx
dependent.

I won't have much time to devote to that myself but I'd be happy to review
a PR :)

On Thu, Oct 10, 2013 at 12:46 PM, Jerome Velociter <notifications@github.com

wrote:

I'm interested in this feature and willing to help to the extend I can (I
have dropwizard in mind as a target platform).


Reply to this email directly or view it on GitHubhttps://github.com/restx/restx/issues/11#issuecomment-26043752
.

Xavier Hanin
Lead architect at 4SH France - http://www.4sh.fr/
RESTX creator and lead developer - http://restx.io/
BordeauxJUG creator - http://www.bordeauxjug.org/
Apache Ivy Creator - http://ant.apache.org/ivy/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment