Software quality assurance

Focus on the testing Circle : Test quality assurance , Automation tools / frame , Platform development , Algorithm test ,BAT/TMD Interview questions for testing posts in large factories / Face to face experience sharing , Test team construction and management , Sharing of testing new technologies .
Occasionally, I also talk about the gains and experiences of personal work . Can help push bytes , Ali , Baidu and other big factories .

It is common to use configuration files to flexibly configure some parameters , The parsing of the configuration file is not complicated .

Configuration management mainly manages some environment related configurations , For example, the domain name of each environment , Database connection information, etc . The carrier for storing these configuration information is generally selected yaml/properties,ini/cfg.yaml Can be applied to Java/Python Test framework ,ini Usually used for Python Test framework for . This article explains the configuration format and analysis method of these two configuration information carriers .

ini/cfg

stay Python Project development in progress ,configparser Library is the officially released configuration file library .ini The document consists of two parts sections And items,sections
Used to distinguish different configuration blocks ,items yes sections The following key values .

1.ini The configuration file format is as follows :
[section0] key0 = value0 key1 = value1 [section1] key2 = value2 key3 = value3
2.section Cannot repeat , The data inside passes section To find , each seletion There can be more than one key and vlaue Key value pair of , Notes in English semicolon (;). The test documents are as follows :
[mysql] host=127.0.0.1 port=3306 user=root password=yourpassword dbname=test
[redis] host=127.0.0.1 por

Technology