Open nicolaferraro opened 5 years ago
Here is what I did for DevoxxBE as demo: https://github.com/christophd/citrus-demo-devoxx-be
In particular review these bits: voting-rest-api.feature VotingRestFeatureIT.java cucumber.properties
You have to set a http client in the Spring bean application context to make this work.
I would consider this as a bug because the client is only used to get passed the failing endpoint check and is not required to run the scenario. Maybe we should automatically add the client on the fly when no explicit default client is set in application context.
I encountered the same problem and fixed it like this:
Define a httpClient Bean, e.g.
<citrus-http:client id="httpClientENO005" request-url="http://localhost:8090/services/enova/invoicesKSeF/read"/>
Then in your feature file you need to tell which httpClient you're using:
Feature: Read KSeF sales invoices
Background:
Given http-client "httpClientENO005"
Scenario: Get Invoices OK
When send GET /sale
Then receive status 200 OK
Citrus Version 2.8.0
Expected behavior Test passes.
Actual behavior It fails.
Test case sample
I'm new to Citrus and Cucumber, but I'm trying a simple HTTP test that fails:
All three steps seem to work, but I receive an exception at the end.
cc: @christophd