You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The openapi.yaml has a base path mentioned in server url but specmatic somehow does not pick up it up on test runs. Is there a way to add this base path in specmatic.json file or through ContractTest.java file.
Can you please suggest how to fix this issue?
The text was updated successfully, but these errors were encountered:
hello @twinkle12b , thanks for reporting this. It is good point that Specmatic should be picking up the server URL. We have this in our backlog and should be added soon.
Meanwhile you can use below setup to pass the base path in your ContractTest.java.
The testBaseURL is an alternative for this scenario (where the URL contains certain base path in addition to host and port) where just providing host and port will not be sufficient. Hope this helps.
Hi @harikrishnan83 Thanks for resolving my issue. But how can I also do this for my stub server as it is also not able to detect the server url path. Also is there a system property that would help me generate log file with coverage in project directory as I could do it command-line way. Can you please help me with this ?
Thanks
Regarding the reports: Specmatic generates a comprehensive API Coverage Report (available in both JSON and HTML formats with drill-down functionality) in the ./build/reports/specmatic directory. Even if you run the tests from the command line, the ./build/reports/specmatic directory will be created in the location where you execute the specmatic test command.
Regarding the base URL for the stub server, I’ve created a separate issue #1431 on your behalf to track progress on that independently. Moving forward, it would be great if you could create separate issues for each question. This helps us respond more quickly.
If your questions have been resolved in this issue, kindly consider closing it.
Description
The openapi.yaml has a base path mentioned in server url but specmatic somehow does not pick up it up on test runs. Is there a way to add this base path in specmatic.json file or through ContractTest.java file.
Can you please suggest how to fix this issue?
The text was updated successfully, but these errors were encountered: