Just started to contact selenium is into the company, the eldest brother gave us a training of UI Automation (in fact, not called training, is to let us know that there is such a thing, I say so, the boss saw to beat, haha). To carry out automated testing, of course, we have to build an automated test framework, said the framework, much is not the same as me, the heart muttered: I Cao, the framework is what east, then the high on the noun, I a pure hand, a thorough small white, how to make it? However, when I all kinds of Baidu, browse documents, blog, the original framework is how easy to build.
Frame building: Look at how you like to layer, is how you like to engage in how to do, but the ultimate goal is to achieve code maintenance is easy. There are several ways to read a document before: 1. Layered according to page, a single page element is encapsulated; 2. Data-driven; hierarchy: page element layer, database layer, database access layer, scene code layer frame design idea: 1, layered thought realizes code maintenance simple ; 2. The import of a rack package (using selenium requires two racks: Selenium-java-2.44.0.jar and Selenium-server-standalone-2.48.2.jar. different browser version corresponding to different selenium rack package version, I am currently trying to version of Firefox and selenium corresponding version: Firefox 33.0->selenium2.44.0; firefox 43.0-> selenium2.53.0), the script does not run if the selenium version does not correspond to the browser version. The first debug script was debugged through JUnit, then used a bit of testng, but it always felt inconvenient, so I thought, could you do it: I just click on a link on the page to run the code behind it? Of course, the first thing to think about is the use of web development knowledge, but it feels too much trouble, still have to develop a lot of things. The next fitnesse is on the scene. Contact FitNesse is the boss to write the Automation interface test platform, as a small white we can only look at the Wiki language Daze, because a little also do not understand the operating principle, should be called simple script code are not understand, so, annoyed I also all kinds of Baidu, find fitnesse information, unfortunate news is, The information tells me all about it. FitNesse is a very suitable platform for automated testing of interfaces, the heart instantly cool. Then the next is to look at Ah, or have no brains, then threw it, did not read. Until recently, the eldest brother quit, sent an automated test platform to manage the mail, and think of FitNesse, and then a variety of Baidu FitNesse framework, and then an accident, the implementation of a link call backstage code, run up. About FitNesse is actually very simple, look at the source code, the principle can be used, but it is best to download a frame to see, or else actually can't touch the mind.
Java+selenium+fitnesse