API Testing – DHC supports HTTP Archive v1.2 (HAR)
The new DHC version 1.2.10 supports HTTP Archive (HAR). ¬†You can import HAR directly to DHC and start testing your API endpoints in a second, now! This article shows you how it works, and how easily you can do that.HAR is a common format for recording HTTP tracking information. HAR format is flexible enough and is adopted across projects and various tools. E.g. You can easily export intercepted HTTP communication as HAR file with Chrome DevTools.DHC has a concept of a repository, a place where to store your scenarios, tests, or just plain HTTP requests/responses. You can put a content to a repository manually by click on a save button. Moreover, you can import an existing content made by your teammates, or produced by 3rd party software.DHC version 1.2.10 supports three formats to import:
- HTTP Archive v1.2 (HAR)
- Swagger version 2.0
- ‚Äònative' DHC format (v1.3) which is based on JSON - please see DHC help, section import/export for details
DHC HAR import dialogI will import HAR from a locally stored file that was made with using of Chrome DevTools. For a demonstration it just contains a track of HTTP communication performed by a browser when opening Restlet home page.
Creation of XHR with using of Chrome DevToolsWhen you do import HAR into DHC all HTTP requests stored in the archive are shown in DHC repository. You just click on one and everything is ready to start playing!
XHR imported into DHCDon't forget you can easily turn plain requests into unit tests by adding assertions and that you can also create complex scenarios based on it.Please note HAR support is still in a preview. Feel free to contact support in case you run into any issue or if you get stuck on something.