Technology Without Borders, to carry forward the selfless spirit of sharing
2013/03/28
The system administrator standing top ten open source tools
Traditional software testing problems and solutions
2013/03/27
For the agility of the top five misconceptions
loadrunner recording ftp protocol script
2013/03/26
Web software test data input checklist
Based on the development process of software testing process management
Talk about the need for performance testing of Internet banking project
Detailed differences and relations between Linux and Unix systems
Some practical contradictions of the reality of project management
2013/03/25
A Chinese famous enterprises then test cattle
Under Linux installation, start the MySQL
About the the performance test tesseract-ocr tools to identify some of the ideas in the verification code
LoadRunner using the system () function call Tesseract-OCR recognition verification code script code
Full-width and half-width of the difference between input method
A What is the full-width and half-width?
(1) angle - a character occupies two standard character position.
Kanji characters and provides for the full-width English characters and the national standard GB2312-80 graphic symbols and special characters are full-width characters. The general command of the system do not have the full-width characters, just word processing will use the full-width characters.
(2) half-width - refers to the position occupied by a character of a standard character.
Usually letters of the alphabet, numeric keys, symbol keys are half-width, within a half-width of the display code is a byte. Within the system, these three characters are handled as a basic code, so the user input commands and parameters generally use half-width.
B full-width and half-width of each in what circumstances?
The full-width accounted for two-byte, half-width of one byte.
The half-width full-width punctuation, full-width punctuation accounted for two-byte, half-width of one byte, regardless of the half-width or full-width, Chinese characters, or to account for the two bytes.
Only in the source code of the programmed use of the half-width punctuation (excluding internal data string)
(In fact, this case simply does not exist the concept of full-width of the half-width on a computer that does not support Chinese characters and other languages can only use half punctuate)
For most fonts, full angle looks larger than the half-width, of course this is not the essential difference.
C full-width and half-width of the difference between
The full-width is the width of letters and numbers, such as Chinese characters accounted position word. Half-width ASCII character way to do with the time from the Chinese character input method input alphanumeric characters are half-width.
Appear in the Chinese character input method, input alphanumeric default to half-width, but the punctuation is the default for the whole angle corresponding toolbar button mouse click input method.
D "full" and "half-width":
The whole angle: means in GB2312-80 (information exchange · basic set of Chinese ideograms coded character set ") in a variety of symbols.
Half-width: refers to the various symbols of the ASCII code of the English document.
Software testing methods and rules
Hump naming rules: first letter lowercase, followed by the beginning of each word uppercase money (java all the methods and properties named in camel)
Pascal naming convention: the first letter capitalized, behind the beginning of each word uppercase Money (C # inside classes, methods, properties, java inside class named)
The variable type character dMoney Hungarian rule: the basis of Pascal naming rules, plus a lowercase
static: static belong to the class of all owners do not need to instantiate, only a small memory consumption during the execution of a program in memory assigned space
Non-static: have to belong to the object, you need to instantiate
Person p = new Person ();
Person p1 = new Person ();
Write a police class, there is a method of training and duty, a police officer the name of an attribute of police officers a property number, write a test class
Assignment by the police number and name call training and duty
JAVA inside strict case-sensitive
public-modified class, the class name and the file name must be exactly the same
Singleton Pattern
If a class constructor is private, outside the class can not directly call the constructor to create methods
Outside the class and can not by the object. Way to call
When a class can not be instantiated, we can only call it what method? Can only call the static method
Class class name {
Private constructor
Static public method static
Only such internal call a private constructor and the instance should return out, returned instance must be a member variable
}
Thread safety issues? For inside the static method to instantiate this variable may still exist, when multiple threads at the same time to get the object, creating multiple objects
The simplest single cases of how to achieve
public class PoliceMan {
/ / Constructor private
private PoliceMan () {
}
/ / Member variables private, static, static code is executed only once
private static PoliceMan onePolice = new PoliceMan ();
/ / Static method Total, returns an instance of the private member variables
public static PoliceMan getInstance () {
return onePolice;
}
}
The UNIT TEST unit test in Visual Studio
TDD (Test-Driven Development) test-driven development is a core agile development practices and technologies, is also a kind of design methodology. The principle of TDD is the first writing unit test cases before development function code, code, test code to determine what you need to write the product code. Unit testing is the most basic test steps. Located in the very bottom of the V-model of the entire product development process.
Approximately as in various development processes RA & PSD is complete without the underlying foundation, UAT program to complete the following steps. UT as the bottom and CODING equally important step is the basis of each CODER must master.
RA( Requirement Analysis) &
PSD ( Productive Specification Design) UAT( User Acceptance Testing)
\ /
\ /
\ /
FSD(Functional Specification Design) SIT(System Integration Testing)
\ /
\ /
\ /
Construction(Coding) UT(Unit Tesing)
\ /
\ /
\ /
\ /
\ /
\ /
\/
Create a new console project (Console Application) in the small amount of code to write, often by New Web Site Project (Web Form), in which typing test code to test. Once the amount of code and logical relations are complicated, this test will be difficult to carry out, and do not have the maintainability. And many functional code can not be completely divorced from the entire project. Such as a class library in a web project, write some MODEL layer To test the method, in order to verify the correctness of the method may have reference to the project model, interface, and library functions. Wait until the can by the compiler, but found you must be logged in to call the method or your directory (Directory) does not have the access rights, so he had to modify the Authorization configuration or add a login method. So layers down your test project involving almost every corner of the test program without a high degree of reusability.
Here we VS2012 example, look at how unit tests in Visual Studio.
1, right-click the solution (Solution) to pop up the context menu (Context). Select Add (Add) - a new project (New Project), in a given template, select Visual C # - Test-Unit Test Project As.
2. Template As.
3.The test method (here the default TestMethod1, general amended as the need to test the method name + Test) add the need to test their own code. But before this, we must first reference to the need to test the project as well as the need to use the class library. In this example, I quote Microsoft MVC4.0 framework, as well as the need to test the project Controller. I test the the Controller ProductCategories () method. The method returns a The ActionResult. 3 lines of test code, the first line to a instantiate the controller, the second line calls the controller method. If only the 2 line test is passed, then the code without problems of syntax, and other parts work together. The third row with an assertion to detect method returns the result is empty. Here I assert that it is not empty, an error if it is empty, the test will fail.
4,The test code is written, you can click on the the above menu Test-Run-AllTests, to carry out the test.。
After the test is completed. Below will produce a list of results. Red for failed TestCase. If you want to be the DEBUG Right-click the red TestCase, select Debug selected Tests. Modifications, can also right-click you want to re-test TestCase, select Run the Selected Tests.
2013/03/24
Control of the entire page cache and update dynamic pages as static pages
How to speed up the pages open faster?
IIS hidden folder can not be applied to the default Home
Configured IIS site, in order to prevent the home directory of the user accidentally deleted ASP script, deliberately set the directory hidden attribute, access to the directory hierarchy results prompted 404 error, I thought insufficient permissions to the folder, modify the permissions improve IISaccount permissions to modify the default home once again. The result was 404, obviously Home in there why not find it? Home and assigned to a specific file name, the page is normal, normal access can not find is the default home page. Then suddenly think, is not a folder hidden attribute result, so quickly unhide property, now no problem.
Interaction type page to prevent IP spoofing techniques
Many interactive web pages, such as online voting, online answer, online surveys and online sweepstakes, in general, will be the user's IP as restrictions, limiting the number of users to participate in activities of the same IP.