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
{{ message }}
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.
I'm attempting to use hmt to provide sandbox for automated testing of a 3rd party API. Specifically, the Cisco Viptela SD-WAN 19.2 API. I'm likely going to go into too much detail here in the hope that some small piece of info will explain why it's not working. I've attempted to record the responses from a series of API calls that provide the responses back to postman, but nothing is shown in the logs or specs directory, beyond a zero byte file with the hostname as the filename.
Steps to Reproduce
Authentication Flow
POST to: https://{{vmanage}}:{{port}}/j_security_check with an x-www-form-urlencoded passing in a username and password.
Obtain a cookie JSESSIONID
GET to: https://{{vmanage}}:{{port}}/dataservice/client/token passing the cookie
Response is a token. This X-XSRF_TOKEN value is then supplied in the header on all subsequent calls, along with the cookie JSESSIONID.
I couldn't get the authentication flow to work through hmt. However, since I only need the cookie and token for the later calls I can copy and set them in the header for the next API calls.
Query some data
GET to: http://localhost:8000/https://{{vmanage}}:{{port}}/dataservice/device
Headers:
User-Agent: PostmanRuntime/7.26.3
Accept: */*
Accept-Encloding: gzip, deflate, br
Connection: keep-alive
X-XSRF-TOKEN: {{token}} (environment var set during authentication steps above)
Cookie: {{copy_cookie}} (environment var set manually copy the JSESSIONID from the cookie when connecting to the host directly)
X-Meeshkan_Scheme: https
Host: {{vmanage}} (environment var containing the server host name
Description
I'm attempting to use hmt to provide sandbox for automated testing of a 3rd party API. Specifically, the Cisco Viptela SD-WAN 19.2 API. I'm likely going to go into too much detail here in the hope that some small piece of info will explain why it's not working. I've attempted to record the responses from a series of API calls that provide the responses back to postman, but nothing is shown in the logs or specs directory, beyond a zero byte file with the hostname as the filename.
Steps to Reproduce
Authentication Flow
https://{{vmanage}}:{{port}}/j_security_check
with an x-www-form-urlencoded passing in a username and password.https://{{vmanage}}:{{port}}/dataservice/client/token
passing the cookieX-XSRF_TOKEN
value is then supplied in the header on all subsequent calls, along with the cookieJSESSIONID
.I couldn't get the authentication flow to work through hmt. However, since I only need the cookie and token for the later calls I can copy and set them in the header for the next API calls.
Query some data
http://localhost:8000/https://{{vmanage}}:{{port}}/dataservice/device
User-Agent: PostmanRuntime/7.26.3
Accept: */*
Accept-Encloding: gzip, deflate, br
Connection: keep-alive
X-XSRF-TOKEN: {{token}}
(environment var set during authentication steps above)Cookie: {{copy_cookie}}
(environment var set manually copy the JSESSIONID from the cookie when connecting to the host directly)X-Meeshkan_Scheme: https
Host: {{vmanage}}
(environment var containing the server host nameAPI Body Response
Expected Result
API Response to be recorded.
Actual Result
Zero byte files in the logs and specs directory with the hostname of the vmanage server.
Additional Context
I have tested following the blog https://meeshkan.com/blog/create-a-mock-server/ and can confirm that hmt can record API from that demo. But not from vManage.
The text was updated successfully, but these errors were encountered: