Moya: Improve documentation surrounding testing

Created on 15 Sep 2016  路  6Comments  路  Source: Moya/Moya

See https://github.com/Moya/Moya/issues/541 for a conversation about how to test, specifically around stubbing. We should document the outcomes of that discussions somewhere in the repo.

chore documentation good first issue

Most helpful comment

Hi there!

First of all, thanks for all your work on Moya! It is a great framework!

While getting acquainted with the library, I saw there have been a few recurring issues about the testing documentation. I thought I may take a step to help.

I was able to write this article.

Since I'm not that well versed in testing myself, I didn't dare to write it as documentation. So I ended with this informal article. Nevertheless, if you give me some feedback on the technical part, I will be very happy to rewrite it more formally as documentation.

I'm mostly concerned about:

  • Are the examples too simplistic? Did in on purpose, but I might have gone too far.
  • I am positive the sample I made for the "Integration Testing" it is quite poor. But I had limited time over the weekend.

All 6 comments

Specifically this comment makes for a great start for the documentation.

Hi there!

First of all, thanks for all your work on Moya! It is a great framework!

While getting acquainted with the library, I saw there have been a few recurring issues about the testing documentation. I thought I may take a step to help.

I was able to write this article.

Since I'm not that well versed in testing myself, I didn't dare to write it as documentation. So I ended with this informal article. Nevertheless, if you give me some feedback on the technical part, I will be very happy to rewrite it more formally as documentation.

I'm mostly concerned about:

  • Are the examples too simplistic? Did in on purpose, but I might have gone too far.
  • I am positive the sample I made for the "Integration Testing" it is quite poor. But I had limited time over the weekend.

That鈥檚 awesome, thanks so much @fbeeper! Feel free to open a pull request and we can go from there - I am sure it will be greatly appreciated.

Sent with GitHawk

@fbeeper This is awesome! Thanks for writing that article about Moya 馃 I don't think the examples are too simplistic. In fact, I think simple examples help to reduce the complexity of the topic.

Nevertheless, if you give me some feedback on the technical part, I will be very happy to rewrite it more formally as documentation.

You're right, I think Moya documentation should read a bit more formal than that article. I think the stubbing documentation we need would be:

  • How to get started stubbing easily and quickly
  • Explaining sampleData in TargetType
  • Explaining the different types of Moya.StubBehavior
  • Explaining the endpointSampleResponseClosure and the EndpointSampleResponse

Those things should be great! Of course, if you open a PR with a rough draft we can always help you review it 馃槂

Great! Will definitely do it in the next few days!

It took me more than a month rather than days... but made it in the end! Cheers!

Was this page helpful?
0 / 5 - 0 ratings