Cause
In general, if the test reports a problem during the development process, I usually do this:
1. Retry the test operation in your own development environment to see if you can reproduce the problem. No. 2
2. Change the database connection pool to the address of the test library and retry the test operation in your own development environment to see if you can reproduce the problem. No. 3
3. Go to the test environment to view the logs. Analyze the problem.
Quick positioning issues
Go to test the environment to view the logs and analyze the problem. Because I am not familiar with Linux commands. So check the log content is more tiring. My previous practice was to use a text editor to locate the problem in a Windows environment after downloading the log.
But sometimes the log is larger, with hundreds of MB or even a few gigabytes .... Download down to n long time ... Open also need to occupy a lot of memory .... People can't stand it.
One chance I found out that the architect was using Vim to view the log.
So I also installed Vim on my own machine. and tried, found that really good use ....
So I'm looking at the log now:
First
VIM journal name
Go to log ... In the future, general test report problems will have a small section of the log. To find this log, I think the most important thing is to take advantage of the log time. So just search for this log time.
/Search Keywords
For example, I know the test report of the problem time is happening today at 14 O ' Day. Then I will enter/2016-02-16 14:..:.. You can have it ....
. is the meaning of any character. Similar to regular expressions ... I will not elaborate ...
You can search after you press ENTER. Press N to find the next one. Press N to find the previous one.
Alternatively, you can enter: Set HLS to set the Found keyword highlighting. Just like in my picture ...
Search finished to return to the original input place just press ctrl+o on it.
It's really very efficient to find a location problem .... As long as the log is detailed, you will soon find the problem ...
In short, the use of vim to search than to download the log to see the real convenience is too much ....
Use Vim to view logs to quickly locate problems