Phalanx project
Translation: Shengchun District: China Perl Association FPC (Foundation of Perlchina) Original: The Phalanx Project Author: Andy Lester Original: http://www.perl.com/pub/a/2005/01/13/ Phalanx.html Table: 2005-01-13perlchina Remind you: Please protect the author's copyright and maintain the crystallization of author labor. Phalanx is an open source collaboration project aimed at improving Perl module automation testing and improving module quality. The author introduces the origin of the project, goals, work forms and its progress, and also encourage people to join the project.
The Phalanx project allows us to imagine a city that is protected by many soldiers. This city's future development needs more powerful military power, so a few faithful land army rushes to the neighboring city, from them to raise more Volunteers can provide strong and powerful assistance when they become more and more strong in the future.
This is the Phalanx project, and this city is Perl, our soldiers are those automated testing mechanisms, neighboring city is a large number of modules in CPAN.
The 2003 OSCON Conference 2003. Larry Wall announced the Ponie project in his seventh ONITION situation routine report. PONIE will become Perl 5.10, but it will run in the Parrot virtual machine (integrated with the basic concept of Perl 6, not a virtual machine).
I have been talking to Leon Brocard, a large number of tests are very important for the development of Perl new versions, indispensable. All we know, or what we envisage can change. So how can we know that each time you can get 2 2 = 4 correct results? How can we know that the object is inherited? Does the XS module work in a established way? We should have a very huge, far more than all current PERL test sets to ensure that Ponie is still true Perl 5. CPAN naturally becomes the largest and rich resources of the test work in the real world.
What modules are there? I have never thought about let PHONIE override all CPAN modules, I just want to follow the principle of Pareto, cover only 10% of the top 10%. However, in the CPAN, there is a module (now this number is about 6,000) when Phalanx is started, and now this number is still very huge, so I chose a more actual number: 100 About 2.5% of the module release.
So how do you take the most in front of the 100 modules? Ideally, I want to know which modules will take the top 100 in real life, but this seems not to reality. The number of downloads of the module reflects this concept to a certain extent. (Some insightful readers may have already thought of this problem, but please relax, because I have already carefully considered these problems.)
Phalanx's top 100 modules are those modules that are most downloaded from major CPAN mirror sites within the last 45 days. We have adjusted statistics, and removed the access record of search engine reptiles on each mirror site, and other download behaviors that can be made to make mirrored in CPAN, and I also determined that more than 450 modules were downloaded within 45 days. The fixed IP address is the robot program, the same removal of their download records.
Why is it called "Phalanx"? In ancient Greece, Phalanx is a military formation name that many soldiers who have a square formation of a shield. Everyone shoulder side by side, and their shield overlap. When each person in Phalanx has a shield, it is like a numerous, interlaced test code formed in the Phalanx project. For any set, you have more test code, the more protection you have. If you can write something tested, you should do these work. Take a look at some simple tests and a project object constructor and access access accessor (tests using Perl test framework):
MY $ Project = Project-> New (name => "Phalanx");
ISA_OK ($ Project, "Project");
IS ($ Project-> Name, "Phalanx", "Name Set Correctly");
Some people may say, "This is just an access device, why don't I try it?" If this code does not work properly in the actual production application, you will not know which processing of the error, so this The test is still meaningful, it is worth it. If there is no test, some of some of the Project :: Name Access will have an error, you may spend hours to trace the root of the troublepo, until the retroactive accessor.
This approach test method (a large number of test procedures based on other test results), which is the basic idea of Phalanx, and will also be the basic idea of Perl test framework.
The main goal of the target Phalanx project is to improve the quality of the test packets of a different module, mostly by increasing the number of module code covered by the test. Of course there is another secondary goal, because our own work is also inseparable from these code.
The first small goal is to find a hidden program bug. When we add test code to the module, we hope to uncover the function of flaws. Indeed, the Working Group of HTML :: Treebuilder found a bug in the module after the test was added.
In addition to adding test code, members of the Working Group also check the integrity and correctness of the module document, and fill all the lacks. Comparison code and embedded document comments, etc., may find some hidden features, these originals that only read the module source code can understand things. This is the completion of the document writing process and the automatic test process.
The principles here: Codes, tests, and documents must be all consistent. If the code has made something, the document can also correctly describe this function, but the test code checks another different behavior, then this is a bug. Even the two of them may occur, or all of them are inconsistent. Sometimes, some long-term code is this look.
The other two small goals are about people. Phalanx provides people with a convenient way to get involved in open source. Phalanx's very nature is to collaborate with each other, and each team works in a module and submits a patch so that other team review and approval. The author of the module still controls the whole game, just co-work with these working groups to determine the test process should be held in that direction.
Second, Phalanx provides a platform that starts working for people who are interested in automated testing but indulgent. As explained in the Perl Testing Kata series of Chromatic, add the test code to the existing code, and the skills to improve the skills of the workgroup members.
Let people come to register in I created Phalanx 100 and guiding principles, and placed
After the Phalanx website, I have to find some heavy equipment infantry (that is, the ancient Greek soldiers that make up the square). After I declare the project was established, I immediately had a volunteer join. Each volunteers write their own intentions to the module author to reach a consensus. Otherwise, create and submit the patch to a module author who is unwilling to accept test code, is a meaningless thing. The author may also ask for several ideas and suggestions at the same time, such as how to test and pay attention. After the preparation work, the volunteer will start to start testing and checking the verification document. This process begins to disturb the devourmed failure.
Twelve different volunteers have been published in 12 modules and did not create it in the first year. I am not going to say anyone here, because I am one of 12 people. It seems that in such a project, work alone means that it is difficult to continue driving. Each of the volunteers I chatted, I was full of confidence, but I found lack of time to continue these work, slowly, there is no driving force, the project's work will discard it.
This year, I tried to adopt another way to raise human resources from the Perl Mongers user group, starting from my own, chicago.com group. Then I have a circle in various meetings, and on YAPC :: Na and OsCon, a simple report is made, requiring people who are interested in this area to join our team. From then on, Southflorida.pm, London.pm, and Perl Seminar New York come to our work, we still be consistent with the module author, and report the current work progress in our central Phalanx Wiki site, but now I hope This can be set up in order to make it easier to interact.
Phalanx Tools Phalanx Tools Over time
The first is the triple group: email, web and wiki sites, which make people constantly exchange information with work progress. The list of Perl-QA mailing on the Lists.perl.org host is being served for people who are committed to testing items. The Phalanx website announced all of all volunteers to see the general information. The Phalanx Wiki site became a convenient place for the progress of the volunteer and the working group.
Second, the centralized version control system is also critical. Because we have a number of collaborators working on each independent module. Fortunately, Perl.org's Robert and ASK very friendly provide the service of the Subversion code warehouse for the Phalanx team.
Third, Paul Johnson wrote, a great deb :: Cover module became a priceless treasure we identified the test collection. Devel :: Cover Analysis runs the test code and identifies which module code line has been tested out by the test collection, and prompts those who have not tested, so volunteers can have targetedly written related tests. Code.
Devel :: Cover is very elegant gives an accurate coverage report, but Phalanx does not need one percent. We have found that in some cases, when pursuit is meticulous to an extreme level, the resulting benefits are minimal, especially those dependent on a particular operational platform. It is the actual value of finding a larger neglected place and tested patch. If this is done, there may be some big gains, such as I haven't used it last time, but I haven't been removed.
How can you join? If you are very interested in automated testing, or you are looking for a way to participate in the CPAN, we are happy to invite you to join. Join Perl-QA mailing list. Perl-QA mailing list is the official mailing list of our Phalanx project. Register to join it and give you a self-introduction.
Find a module you interested in finding a module that will benefit from your attention. Many volunteers choose the modules they need to use every day. Of course, you can also choose other modules other than Phalanx 100.
Looking for those like-minded people, while people are united, Phalanx will get better and better.
You can (you should also) join our ranks and work together to let Perl 6 come as soon as possible.
Other Links Other Connections
Phalanx homepage
Servel :: Cover
"Join the Phalanx Project" PDF copy of the speech
Phalanx Wiki
Perl.com Compilation Copyright ?? 1998-2004o'Reilly Media, Inc.