mockserver icon indicating copy to clipboard operation
mockserver copied to clipboard

Extend Documentation

Open jamesdbloom opened this issue 11 years ago • 11 comments

  1. add example of matching a JSON array (in request matcher examples)
  2. CA certs, SSL & TLS (add page)
    • customise private key and x509
    • explain how the CA & TLS works
    • document adding MockServer CA certification as trusted cert to
      • android emulator
      • mac os
      • Java JVM
    • add: HttpsURLConnection.setDefaultSSLSocketFactory(SSLFactory.getInstance().sslContext().getSocketFactory());

jamesdbloom avatar Apr 16 '15 07:04 jamesdbloom

if using the API is really the recommended way of setting up expectations (over, say, the Java client), then may I suggest that on this page here: http://www.mock-server.com/mock_server/creating_expectations.html, you remove the client sections, since they are already detailed in http://www.mock-server.com/mock_server/mockserver_clients.html?

I actually didn't see the request matcher API description at first because the client stuff is very prominent. I was lucky that I read this part on the page about clients (it's missing on the expectations page, where it would also be handy): Note: It is not necessary to use the provided clients because the MockServer web api is designed to be very simple JSON/HTTP so it is easy to interact directly with the MockServer with any HTTP client.

there is nothing prominent to advertise the API anywhere, IMO. Maybe you could rename the page title to "Expectations API" even, to make it more clear

poohsen avatar Sep 08 '15 13:09 poohsen

see #172 for more details documentation changes

jamesdbloom avatar Sep 21 '15 08:09 jamesdbloom

btw, I ended up using the java client instead of the API directly. I tried to deduce what the API calls would have to look like from the code and the logging but I had trouble with more complicated payloads (possibly escaping quotes and such) so I resorted to using the client. AFAICT there's no single page in the docs dedicated to explaining the actual JSON that needs to be sent to the server. Am I missing something?

poohsen avatar Sep 21 '15 09:09 poohsen

You are absolutely correct, creating detailed API documentation is on the list for documentation improvements.

jamesdbloom avatar Sep 21 '15 10:09 jamesdbloom

Add useful tip about:

HttpsURLConnection.setDefaultSSLSocketFactory(SSLFactory.getInstance().sslContext().getSocketFactory());

From #205

jamesdbloom avatar Mar 06 '16 07:03 jamesdbloom

Hi @jamesdbloom! I've tried the latest version with the command line version of mock server and I get the certificate_unknown exception for https requests. Is creating my own java program the suggested work around for this issue? Is there an example of how to do this with a simple endpoint to capture https traffic?

Thanks!

djoelz avatar Jun 26 '16 23:06 djoelz

@jamesdbloom Didn't see update on this issue. We also wonder if we run a stand-alone MockServer, how do we setup the request/response expectation? In our automation script, we have expectation setup for each request, then run MockServer during automation running. But what if we want to run a stand-alone MockServer? from the document, it just tells us how to run it, but didn't mention anything about setting up the response/request, where to set it up?

alshari86 avatar Jul 11 '17 22:07 alshari86

This is now the highest priority issue, after having fixed numerous other bugs. Once I have completed one more release (in the next day or two) I will start to improve the documentation and fix no other bugs until it is done.

jamesdbloom avatar Nov 13 '17 06:11 jamesdbloom

#257 document the harmonised MockServer and Proxy features.

jamesdbloom avatar Dec 25 '17 20:12 jamesdbloom

#637 make "2. Run Test Scenarios" clearer that this refers to a user running their own tests

jamesdbloom avatar Jun 09 '19 20:06 jamesdbloom

This has now been completed with the remaining two areas being migrated to the backlog as: https://trello.com/c/aZJt3YJA/57-improve-tls-documentation and https://trello.com/c/7HWvKoVR/55-document-ui

jamesdbloom avatar Dec 01 '19 14:12 jamesdbloom