3 ms·
I have been making my test suite emit structured data for the API tests which is used to document the API. This eliminated the margin for error in manually kee
by benologist 7y ago
I have been making my test suite emit structured data for the API tests which is used to document the API. This eliminated the margin for error in manually keeping the API documentation up to date. This improved the test coverage a lot as complete coverage is required for the documentation to be complete. It looks great too -
https://github.com/userdashboard/organizations/blob/master/api.txt https://github.com/userdashboard/organizations/blob/master/a... derived from https://github.com/userdashboard/organizations/blob/master/tests.txt#L244 https://github.com/userdashboard/organizations/blob/master/t...
Another thing that helped was moving all my UI page tests to Puppeteer which is a NodeJS API for browsing with Chrome and tentatively Firefox web browsers. This let me automatically generate screenshots for my entire UI to publish as documentation, while simultaneously testing the responsive design under different devices which surfaced many issues.
https://userdashboard.github.io/administrators/stripe-subscriptions/deleting-subscription-at-period-end https://userdashboard.github.io/administrators/stripe-subscr... generated by https://github.com/userdashboard/userdashboard.github.io/blob/gh-pages/administrators/stripe-subscriptions/deleting-subscription-at-period-end.js https://github.com/userdashboard/userdashboard.github.io/blo...
- domlebo70 7y agoInteresting idea. I wonder if this could be incorporated into some sort of test runner for testing API components. Emit a structured summary of responses that the tests generate
- alzoid 7y agoI did the same thing with puppeteer when I had to do a bootstrap upgrade. It was easier to generate screen shots at each breakpoint to make sure there pages looked ok.
- 2rsf 7y ago> moving all my UI page tests to Puppeteer Why did you choose Puppeteer over other options like Protractor/Selenium or Test Cafe ?
- benologist 7y agoI already had some familiarity with Puppeteer but mostly it's just because Puppeteer's NodeJS and my project's NodeJS, they work together without extra setup steps, configuration etc.