Jump to: navigation, search

PDTT - PHP 5.3 Code Assist Tests

Revision as of 04:08, 17 February 2009 by Roy.zend.com (Talk | contribs)

pdtt - Test PHP 5.3 Code Assist

 pdtt is a clone of the popular phpt 

The first thing you need to know about tests is that we need more!!! Although Eclipse PDT works just great 99.99% of the time, not having a very comprehensive test suite means that we take more risks every time we add to or modify the Eclipse PDT Code Assist Engine implementation. The second thing you need to know is that if you can write PHP you can write tests. Thirdly - we are a friendly and welcoming community, don't be scared about writing to (pdt-dev@eclipse.org) - we won't bite!

General

So what are pdtt tests?

A pdtt test is a little script used by the pdt internal and quality assurance teams to test Eclipse PDT's code assist functionality. It can be used with new releases to make sure they can do all the things that previous releases can, or to help find bugs in current releases. By writing pdtt tests you are helping to make Eclipse PDT more stable.

What skills are needed to write a pdtt test?

All that is really needed to write a pdtt test is a basic understanding of the PHP language, a text editor, and a way to get the results of your code. That is it. So if you have been writing and running PHP scripts already - you have everything you need.

What do you write pdtt tests on?

Basically you can write a pdtt test on one of the various code assist scenarios available. You can write a test on a basic language element (a type, function or variable). If you want more guidance than that you can always ask the Eclipse PDT Quality Assurance Team on their mailing list (pdt-dev@eclipse.org) where they would like you to direct your attentions.

How is a pdtt test is used?

When a test is called by the TestPdttScripts it takes various parts of the pdtt file to name and create a .php file. That .php file is then saved in a temporary project. The location that is marked with "|" is used to initiate the code assist engine. If the proposals of the engine "match" the proposals provided in the pdtt script - it passes.

What should a pdtt test do?

Basically - it should try and break the Eclipse PDT Code Assist Engine. It should check not only the regular code assist proposals, but it should also check edge cases.

Template

Providing ... Case


Tests

1. Case: <? class A {} $a = new | ?>

  Study: