question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MockWebServer and Multiplatform

See original GitHub issue

I have am using MockWebServer in jvmTest but I get this error when I run gradle allTest:

okHttpName
java.lang.NoSuchFieldError: okHttpName

I even tried to just do a simple test:

class SomeTest {

@Test
    fun someTest() {
        val mockWebServer = MockWebServer()
        assert(true)
    }
}

And it fails.

The Test annotation is from kotlin.test.Test

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
yschimkecommented, May 4, 2020

@JavierSegoviaCordoba there has been a lot of spam from this account, for now I’d assume the poor chaps account has got hacked, and just ignore it.

0reactions
JavierSegoviaCordobacommented, May 4, 2020

@VN-tunt89 can you explain why?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use MockWebServer to Mock and Test HTTP Calls
Learn how MockWebServer comes into play here. ... You can also use a MockWebServer on multiple platforms, irrespective of the framework or ...
Read more >
Testing on Kotlin Multiplatform Mobile and a Strategy to Speed ...
An alternative way for testing Kotlin Multiplatform code would be to use ... (e.g. Ktor MockEngine, MockWebServer, Mocked HttpInterceptor).
Read more >
Mocking HTTP responses (experimental) - Apollo GraphQL
MockServer is multiplatform but if you're using Java only, we recommend using OkHttp MockWebServer which will provide idiomatic Java APIs.
Read more >
Change Log - OkHttp
Fix: Configure the multiplatform artifact ( com.squareup.okhttp3:okhttp:3. ... New: Drop the tunnelProxy argument in MockWebServer.useHttps() .
Read more >
Testing Api layer in Android - Testing Fundamentals
MockWebServer : It provides support for mocking of the server with which we can actually make api calls and get the output. //...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found