Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

PHPUnit introduction and Environment Construction of Interface Automation Test Series

Shulou Source: shulou.com Published: 2022-06-03 06:21:27 11月23日 Update

Phpunit Introduction

PHPUnit is a testing framework for PHP programmers, which is a unit testing framework for xUnit architecture.

phpunit environment setup

Here are two ways to build:

The first one: directly use xampp, which integrates phpunit

Address: www.apachefriends.org/zh_cn/index.html

Help: jingyan.baidu.com/article/dca1fa6fbcd20cf1a5405258.html

Second:

1. Install php and configure it into the system environment variable path

2. Download phpunit: https://phar.phpunit.de/phpunit.phar After downloading, rename it and remove the version number behind it.

3. Put phpunit.phar in the project directory

4. cmd command line, enter the directory where the project is located, run the command: echo @php "%~dp0phpunit.phar" %* > phpunit.cmd You can see that a phpunit.cmd has been produced.

5. Close the cmd that was opened before, reopen one, and then type phpunit --version. The result is as follows

PHP development tools

More professional can choose PhpStorm, just simple configuration can be used, the specific method everyone Google it. Due to the limitations of my environment, I will write it directly with notepad++ here.

data acquisition

The code involved in the future can be obtained as follows (the code will be issued gradually, don't worry):

Click on the link to join the group 522720170 (shared): jq.qq.com/?_ wv=1027&k=5C08ATe

Tags: Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Microsoft Shulou Tech Info MySQL Redmi