Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

PHPUnit- framework code writing for interface automation testing 2

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Then the last article continues to explain the code. Last time, require.php was introduced into the code. What does this thing do? today we will talk about it.

The require.php content is as follows

This is not necessary, you can also choose to introduce the required files where needed, the reason why we are separated from here is to facilitate maintenance, in case there are changes in the future, you only need to maintain this php file, the rest do not need to care about.

The content of transfer.php is as follows, mainly encapsulating get and post requests as class, and there are other methods you can encapsulate here later. The details have been explained in the previous article and will not be repeated here.

Read_config.php content is as follows, mainly to read the host configuration file, this is also optional, you can also write in the code, we extracted it mainly for convenience, for example, you use a host in the test environment, to the online is another host, then we only need to maintain the corresponding file.

The host file read is in xml format, and the contents are as follows

Http://v.juhe.cn/laohuangli/d

Http://127.0.0.1

Data acquisition

The code involved in the follow-up can be obtained in the following ways (the code will be distributed gradually, don't worry): click the link to join group 522720170 (available in the share): https://jq.qq.com/?_wv=1027&k=5C08ATe

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report