java.lang.AssertionError: 1 expectation failed. Expected status code <201> doesn't match actual status code <415>.

Stack Overflow | Ke Liu | 3 months ago
  1. 0

    How to use REST Assured to upload a file?

    Stack Overflow | 3 months ago | Ke Liu
    java.lang.AssertionError: 1 expectation failed. Expected status code <201> doesn't match actual status code <415>.
  2. 0

    GitHub comment 755#254240491

    GitHub | 2 months ago | allaboutapis
    java.lang.AssertionError: 1 expectation failed. Expected status code <200> doesn't match actual status code <403>.
  3. 0

    Rest Assured Exception when test fails

    Stack Overflow | 3 years ago | user2884037
    java.lang.AssertionError: 1 expectation failed. JSON path account doesn't match. Expected: 10 Actual: 12345</p> <pre><code>at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How do I write this J Unit test properly? It fails even though the code works. What am I missing?

    Stack Overflow | 2 years ago | Corwin
    java.lang.AssertionError: 2 expectations failed. Expected status code <200> doesn't match actual status code <400>. Expected content-type "JSON" doesn't match actual content-type "". at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  6. 0

    [Mifos-developer] Fwd: Build failed in Jenkins: MIFOSX INTEGRATION TEST #313

    Google Groups | 3 years ago | Gurpreet Luthra
    java.lang.AssertionError: 1 expectation failed. Expected status code <200> doesn't match actual status code <400>.

    5 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.AssertionError

      1 expectation failed. Expected status code <201> doesn't match actual status code <415>.

      at sun.reflect.NativeConstructorAccessorImpl.newInstance0()
    2. Java RT
      Constructor.newInstance
      1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      4. java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      4 frames
    3. Groovy
      AbstractCallSite.callConstructor
      1. org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
      2. org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
      3. org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
      4. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
      5. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
      6. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
      6 frames
    4. io.restassured.internal
      ResponseSpecificationImpl$HamcrestAssertionClosure$validate$1.call
      1. io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate(ResponseSpecificationImpl.groovy:451)
      2. io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure$validate$1.call(Unknown Source)
      2 frames
    5. Groovy
      AbstractCallSite.call
      1. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      2. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      3 frames
    6. io.restassured.internal
      RequestSpecificationImpl.applyPathParamsAndSendRequest
      1. io.restassured.internal.RequestSpecificationImpl.applyPathParamsAndSendRequest(RequestSpecificationImpl.groovy:1632)
      1 frame
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    8. Groovy
      MetaClassImpl.invokeMethod
      1. org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      2. groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      3. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
      4. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
      5. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:812)
      5 frames
    9. io.restassured.internal
      RequestSpecificationImpl.invokeMethod
      1. io.restassured.internal.RequestSpecificationImpl.invokeMethod(RequestSpecificationImpl.groovy)
      1 frame
    10. Groovy
      AbstractCallSite.callCurrent
      1. org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call(PogoInterceptableSite.java:48)
      2. org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.callCurrent(PogoInterceptableSite.java:58)
      3. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
      4. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
      5. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182)
      5 frames
    11. io.restassured.internal
      RequestSpecificationImpl.applyPathParamsAndSendRequest
      1. io.restassured.internal.RequestSpecificationImpl.applyPathParamsAndSendRequest(RequestSpecificationImpl.groovy:1637)
      1 frame
    12. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    13. Groovy
      MetaClassImpl.invokeMethod
      1. org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      2. groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      3. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
      4. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
      5. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:812)
      5 frames
    14. io.restassured.internal
      RequestSpecificationImpl.invokeMethod
      1. io.restassured.internal.RequestSpecificationImpl.invokeMethod(RequestSpecificationImpl.groovy)
      1 frame
    15. Groovy
      AbstractCallSite.callCurrent
      1. org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call(PogoInterceptableSite.java:48)
      2. org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.callCurrent(PogoInterceptableSite.java:58)
      3. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
      4. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
      5. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182)
      5 frames
    16. io.restassured.internal
      RequestSpecificationImpl.post
      1. io.restassured.internal.RequestSpecificationImpl.post(RequestSpecificationImpl.groovy:170)
      2. io.restassured.internal.RequestSpecificationImpl.post(RequestSpecificationImpl.groovy)
      2 frames
    17. integrationTest
      DocumentsIT.testDocuments
      1. integrationTest.DocumentsIT.testDocuments(DocumentsIT.java:29)
      1 frame
    18. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    19. JUnit
      ParentRunner.run
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      5. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      6. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      8. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      9. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      10. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      11. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      12. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      13. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      13 frames
    20. JUnit4 Runner
      JUnit4TestReference.run
      1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
      1 frame
    21. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
      4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
      5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
      5 frames