Software testing practical projects, Q&A

Hello everyone, I'm Xiao Tan.

Since I started the blog, I have updated a lot of actual projects, but some small partners encountered problems when building the environment.

So, I collected a wave of high-frequency problems and compiled this article for your reference to avoid repeated pitfalls.

If you have encountered other pits and unsolved problems, you can reply in the comment area

interface test project

1. No matching distribution found for itypes==1.1.0

Could not find a version that satisfies the requirement itypes==1.1.0 (from -r requirements.txt (line 8)) (from versions: )
No matching distribution found for itypes==1.1.0 (from -r requirements.txt (line 8))

Reason: mirror source problem during pip3 install installation

solve:

Option 1, replace the mirror source

pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

The second option is to install the failed third-party library separately, such as:

pip3 install itypes==1.1.0 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

2. Couldn’t import Django.

Traceback (most recent call last):
  File "manage.py", line 17, in <module>
    "Couldn't import Django. Are you sure it's installed and "
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?

Reason: problem with the virtual environment running python

Solution: refer to the article https://www.cnblogs.com/azhaozhao/articles/14776318.html

After the virtual environment is built, there will be () in front of the path

image-20220316161752640

Then execute the pip3 command just now to install third-party libraries such as Django in this virtual environment.

pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

3. No such file or directory: ‘requirments.txt’

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirments.txt'

Reason: The path executed by pip3 is incorrect

Solution: Execute the pip3 command in the path where the requirements.txt file is located

image-20220316175114587

4. ^SyntaxError: Generator expression must be parenthesized

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x0000024D934BDD08>Traceback (most recent call last):……File "C:\Python37\lib\site-packages\django\contrib\admin\widgets.py", line 152    
'%s=%s' % (k, v) for k, v in params.items(),    
^SyntaxError: Generator expression must be parenthesized

Reason: I said this in the tutorial, did you not read the tutorial carefully?

Solution: find the file widgets.py

image-20220316162120269

remove the comma at the end of line 151

image-20220316162344333

5. Starting development server at http://0.0.0.0:8099/

Performing system checks...

System check identified no issues (0 silenced).
March 16, 2022 - 17:57:46
Django version 1.11, using settings 'studentManagementSystem.settings'
Starting development server at http://0.0.0.0:8099/
Quit the server with CTRL-BREAK.

Reason: This is a successful startup...

6. Various problems caused by using Chinese

The project folder has a Chinese name, which may cause the program to fail to start, so an English folder must be used.

The computer name is Chinese, which may cause the program to fail to start. It is necessary to change the computer name to English, and then restart the computer.

7. Other issues

①Python should use version 3.7, and Django should use version 1.11 written in requirements.txt. Please check the version carefully, most of the problems are caused by version compatibility.

②360 browser, may not be able to access the url, it is recommended to use Google Chrome.

The above basically covers all the pits that newbies may encounter. If you avoid these pits and you haven't built the interface project, you can:

① Give up this project and practice other projects;

②Join Xiaotan's growth camp. Members of the growth camp can enjoy my mirror project and can easily complete the installation.

Mall project

1. Open the yoshop webpage, there is no [Enter Mall] button

If you follow the tutorial and it still doesn't work, consider:

①It can be accessed using the built-in browser of Hbuilder

② Can be accessed using Google Chrome browser

③There is a background administrator and a background super administrator, click the latter

If I didn't follow the tutorial, I...

2. phpstudy prompts: the hosts file may not exist or is blocked from opening, and the synchronization of hosts fails

solve:

Method 1, the administrator starts phpstudy

Method 2: Manually add hosts (please Baidu for specific methods)

127.0.0.1 www.yoshop.com

3. Mysql cannot be started in phpstudy

Reason: You have installed and run Mysql before

solve:

Method 1, open the cmd window, enter services.msc, stop the local Mysql service (note that it is stopped, not disabled!!!), and then start Mysql in phpstudy.

Method 2: Uninstall Mysql, clear the local environment, and try again.

4. After HBuilder changed the project, the cross-domain problem could not be solved

Solution: use it in Hbuilder's built-in browser

5. This application DCLOUD APPID is not owned by the current account, please contact the owner to set your account APPID

solve:

yoshop2.0-uniap > uview-ui > manifest.json > get APPID again

6. There is only one product of spicy strips on the page, or there is no product

image-20220317192630661

Problem: Didn't read the tutorial carefully

Solution: If there is no product, you can go to the mall background to add it yourself. Also, please read the tutorial carefully.

01-demo uses the official back-end environment, you are not allowed to change the data, and if the official service is closed, 01-demo cannot be used either;

02-local needs to build its own back-end environment and can operate it at will.

7. Other pits are not stepped on, but after deployment, opening the browser shows that it cannot be accessed

Reason 1: The port may be occupied

Solution: Dispose of the occupied port, or change a port

Reason 2: Because of the previous wrong operation, the browser has an error cache

Solution: Clear the browser's cache and try again

8. Others

Common troubleshooting methods:

Press F12 to open the debug page of the browser, then refresh the page to view the specific error (Console) and the result of requesting the service (Network)

image-20220318104257829

If you see here, you have not installed the successful project, I suggest you:

① Clear all the environment of the local computer, go to the construction tutorial again, and follow the operation step by step. Most of the small partners failed to build the environment because they missed the key information in my tutorial.

② I will use the local code + the official backend of yoshop instead of building the backend environment myself.

Jiwuwang web project

  1. Are there requirements documents, test plans, interface documents?

no.

Jiwu.com web project is a very basic project, mainly to teach you how to find projects & provide you with two test cases.

  1. Can test cases send xmind source files?

can not.

Prevent someone from maliciously using it (I provided xmind in the early days, but it turned out that the person who took the information was a training institution...)

Test automation project

  1. The interface request has no data

For the automated test project, I have done a clearing process, so that you can practice from 0 to 1 following the tutorial.

  1. This project is so hard

I……

This is an entry-level automation training project. If you can't learn this, put more effort into learning it.

& gives you two test cases.

  1. Can test cases send xmind source files?

can not.

Prevent someone from maliciously using it (I provided xmind in the early days, but it turned out that the person who took the information was a training institution...)

Test automation project

  1. The interface request has no data

For the automated test project, I have done a clearing process, so that you can practice from 0 to 1 following the tutorial.

  1. This project is so hard

I……

This is an entry-level automation training project. If you can't learn this, put more effort into learning it.

Guess you like

Origin blog.csdn.net/wukonginsight/article/details/123716890
Recommended