1

The app that I am trying to test has an SFTP server that can be queried via API. Swagger shows the following sample cURL request to get domain files information, and I am having a hard time making this call with Karate:

curl -X GET -H 'Accept: application/json' 'https://{host}:{port}/api/{clientId}/'

I do the following where baseUrl is defined as https://sftp.mydomain.com:22 where 22 is the port number that I can successfully use to connect to the SFTP server via Cyberduck:

Feature:

  Background:
    * url baseUrl
    * def moduleBase = '/api/12345/'

  Scenario:
    * path moduleBase
    When method get
    Then status 200

The error that I get is this:

ERROR com.intuit.karate - src/test/java/mytest.feature:9
When method get
http call failed after 815 milliseconds for url: https://sftp.mydomain.com:22/api/12345/

What am I doing wrong?

sprogissd
  • 2,755
  • 5
  • 24
  • 45

1 Answers1

0

Clearly it may not be HTTP so I don't think Swagger and all is legit.

Maybe you can just delegate to the OS. Refer: https://stackoverflow.com/a/64352676/143475

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248