ArrayIndexOutOfBoundsException use karate 0.8.0

Viewed 172

my code:

@upload @offline
Feature: upload one mp3 file

  Background:
    * url 'http://xx.test.com'
    * def Sign = Java.type('token.Sign')

    Scenario:
      * def ck = Sign.execute(false)
      * print ck
      * path '/rest/n/test/up'
      * cookie userId = ck.id
      * cookie tes.api_st = ck.st
      * cookie did = ck.did
      * multipart field title = 'hello'
      * multipart file ringtone = { read: '123.mp3', filename: '123.mp3', contentType: 'audio/mp3' }
      * method post
      * status 200
      * match response contains { result: 1 }

And mvn test -Dtest=xxx will output the below info:

19:39:57.073 [main] ERROR com.intuit.karate - java.lang.ArrayIndexOutOfBoundsException: -1, http call failed after 1542281997073 milliseconds for URL: http://tianou123.test.gifshow.com/rest/n/test/up
19:39:57.073 [main] ERROR com.intuit.karate - http request failed: -1
19:39:57.925 [main] WARN  io.sentry.dsn.Dsn - *** Couldn't find a suitable DSN, Sentry operations will do nothing! See documentation: https://docs.sentry.io/clients/java/ ***
Failed scenarios:
xxx/upload.feature:8 # Scenario: 

So, I don't know why. Because the request not arrive the backend server.

And the request can run OK using postman.

0 Answers
Related