Heat Test Framework 基于REST ASSURED框架的热测试简单解决方案

网友投稿 586 2022-11-01

Heat Test Framework 基于REST ASSURED框架的热测试简单解决方案

Heat Test Framework 基于REST ASSURED框架的热测试简单解决方案

HEAT - User Documentation

Please, have a look here code of conduct

Table of Contents

WHY do we need a test frameworkHEAT - Hotels.com Engine Architecture for TestingFirst General Configurationpom.xmlenvironment.properties Single Mode Requesttestng.xmljson input filefirst run Flow Mode Requesttestng.xmlJSON input file Compare Mode Requesttestng.xmljson input file ExpectationsA particular element in the json response is equal to a valueCheck the presence or the absence of a specific field in a responseCheck if a string contains another string or notCheck if an array in the response has a specific sizeRegular expressions (regexp and regexpToMatch)Checks on the number of occurrences of a string in another stringCondition on the execution of a check PlaceholdersPathPreloadGetStepCookieHeaderSysPropPresent / NotPresentTodayWiremock Specific ChecksExecution overviewCreate and register your SpecificCheckJAVA SPI Mapping fileHow to access to test information during the processing External Custom ModulesInitial configurationPlaceholder ModulePlaceholder Module ProviderUse your Placeholder in a HEAT test Test run and debug with command lineSelect the environmentSet the log levelRun just the tests you need Collect test resultsOutput consoleHEAT XML reportHEAT Web report

WHY do we need a test framework

Do you ever need to write automatic tests on REST APIs? Welcome to our world! Well, there are a lot of commercial products used for that, and they work quite well.

But do you ever need to share your automatic scripts with other people all over the world or simply with other colleagues that need to make some changes in the same moment on the same code line as you? and do you ever need to commit your tests on a common repository? Do you? Good, and how do you manage all your merge tasks? Well, in this case maybe it would be useful go on with the reading....

The most famous commercial products you can find offer some fantastic GUIs that, in terms of "objects" to commit on a repository, are only one file. SoapUI, for example, is only an XML file. JMeter is a JMX file. All those files are made of several hundred of lines, and it is very difficult to see all the differences from a commit to another, and in case of merge, it can be very frustrating, especially if there are conflicts...

So, in order to preserve your offices from unuseful and unproductive bloodshed, please look for other nice testing solutions! Do you need an idea? HEAT!

HEAT - Hotels.com Engine Architecture for Testing

Heat is a simple solution based on REST ASSURED framework.

Typically you need a "test module" that, if driven in a proper way, has to produce requests to the application under test and has to receive responses from it. Then it has to make some checks on the retrieved response and to produce a documentation to show the user the result of the tests. This documentation has to be in a format readable and usable with a deploy manager like Jenkins (open source, so, folks, it wins!) or Atlassian Bamboo.

What can change is "only" how you can drive your "test module".

Heat Test Framework makes everything very simple because you will be able to write test cases with a simple json file. So no need to write java code, no need to depend on developers for more complicated tests, no need to pay attention to our friend "checkstyle". It is a simple maven project with a pom linking to a "core" (open source) and a folder with your json files. Each json is a test suite and in each test suite there are several test cases. You can choose to run all the suites, only some of them, or only some test cases among the ones you have written with a command line.

Legal

This project is available under the Apache 2.0 License.

Copyright 2015-2018 Expedia Inc.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Spring为何需要三级缓存解决循环依赖详解
下一篇:用法简单的呈现一组图片和视频播放的框架
相关文章

 发表评论

暂时没有评论,来抢沙发吧~