当前位置:网站首页>Software testing often asks, do you really build a testing environment?

Software testing often asks, do you really build a testing environment?

2022-06-13 10:17:00 Software test network

Often during the interview , The interviewer always asks , be familiar with linux Orders ?

At the same time, in many recruitment JD It is clearly pointed out that testers will build a test environment , And this is not only reflected in the post requirements of Senior Test Engineer , At the same time, junior test engineers are also required .

1. What is a test environment

Test environment (Testing environment) It refers to the description of the software and hardware environment on which the test runs , And any other software that interacts with the software under test , Including drive and pile . Test environment refers to the computer hardware necessary to complete software testing 、 Software 、 Network devices 、 General term of historical data .

In fact, that is , Test environment = Software + Hardware + The Internet + Data preparation + Testing tools ;

In layman's terms , Test environment refers to the carrier that testers need when testing programs .

2. Characteristics of the test environment

2.1. real

The test environment should try to simulate the user's real environment , However, due to the large number of software users , Then the real environment becomes very complex , Therefore, the test environment should try to simulate the user's real environment .

2.2. clean

We often say that we must ensure that the test environment is clean , Don't rely on ” Stolen data “, The clean test environment here doesn't just mean that there is no ” Stolen data “, In addition to the necessary software in the test environment , No other software , Especially when building a performance test environment , Make sure the test environment is clean and independent .

2.3. Operating platform

Where to build the test environment ?

The test environment is basically built on the server .

The test environment is built on which operating platform in the server , Generally speaking, the test environment can be built in windows On the platform , Can also be built in linux platform .

windows The choice of platform is windows server 2003,windows server 2008 And so on are server systems , You can build a test environment .

Then we windows Personal of the operating system PC Can I build a test environment ?

personal PC Of course, you can build a test environment , But because of personal PC Limitations of hardware and software , We usually don't use it to build a test environment , But if you do the simulation experiment by yourself, it's no problem .

But in enterprises, we generally don't use windows Build a server on the platform , But to choose linux platform .

This is because we often choose linux Platform as the operating system of the server .

What we often use linux The system is linux Distribution version , Such as CentOS、RedHat、Debian、Ubuntu etc.

linux Kernel and linux The difference between distributions ?

linux The kernel is linux The core function of the operating system , yes linux The whole foundation of the system , Open source software .

linux A distribution is one that will linux Kernel and peripheral applications and documentation packaging , And provide system installation interface and system configuration 、 Management tools .

2.4. Set up the test environment

If the test environment you need to build is just installed linux operating system , There is no tomcat And the database , You need to install... Before setting up the test environment tomcat And the database .

1) install jdk

   If you have your own , Uninstall before loading
  1. Copy the package /usr/local
  2. decompression
  3. Configure environment variables
  export JAVA_HOME=/usr/local/jdk1.7.0_71
  export CLASSPATH=.:JAVAHOME/lib/dt.jar:JAVA_HOME/lib/dt.jar:JAVAH?OME/lib/dt.jar:JAVA_HOME/lib/tools.jar
  export PATH=JAVAHOME/bin:JAVA_HOME/bin:JAVAH?OME/bin:PATH
  4. Check java Is the installation successful
  java -version

 

2) install tomcat

  1. Download the tomcat Package replication /usr/local
  2. decompression
  3. stay tomcat/bin Directory execution startup.sh file
   Start the service
   stay browser Middle link :IP:8080
  4. If you can't connect , but tomcat Again, the display starts OK, Check firewall
   Path is /etc/sysconfig/iptables, take 8080 Open port
  5. Restart the service

 

3) mount this database

The database is generally installed mysql and oracle A little more , First download the corresponding database installation package .

mysql Simple installation , You can use the source code to install , You can also use yum Online installation , Here is a brief introduction to yum Online installation .

use yum Online installation :

1.rpm -qa|grep mysql -- Check linux Whether there is mysql

2. If there is mysql, uninstall rpm -e --nodeps mysql

3. install

  yum install mysql-server mysql mysql-dev -y

 

4. After successful installation , Start the service

  service mysqld start
  service service name restart/start

 

5. Direct input mysql Go to the database

If it's installation oracle Be sure to pay attention to , Install carefully , Find an installation tutorial for the corresponding environment on the Internet , Install step by step , Beware of mistakes ,oracle Be careful , Once the installation goes wrong , It will be quite troublesome , You may need to reinstall the operating system to solve .

The above will only be installed on a clean operating system , Generally, you only need to install it once .

Learning to build a test environment is one of the necessary abilities of every tester , Master the basic linux Commands are equally important .

原网站

版权声明
本文为[Software test network]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/164/202206131008420214.html