https://bugzilla.wikimedia.org/show_bug.cgi?id=39473

--- Comment #6 from Daniel Friesen <[email protected]> 
2012-11-16 04:14:01 UTC ---
(In reply to comment #1)
> It would also be nice to get (very far) away from the current
> yet-another-syntax and replace parserTests.txt with standard data providers 
> and
> sane ways (= standard PHP) to set input and check output.

What is so wrong about using a custom syntax? DSLs are a perfectly respectable
way to handle this kind of case. They make tests more concise and easier to
write.

(In reply to comment #3)
> Why do we even need parserTests.php? We don't use it in Jenkins, and the
> PHPUnit tests for the Parser seem good enough (and can be improved if not).

parserTests.php has the following features that PHPUnit does not appear to have
(and the majority of them I do not believe are possible to implement within
PHPUnit):
- Better error output; The opening of PHPUnit's failure output includes a pile
of garbage, basically an opaque serialized set of arguments before it even gets
to the diff. While parserTests is mostly concise. The test name is easy to see.
And the diffs are coloured.
- More control over test output format.
- Tests can be filtered down to specific files; Useful for working on an
extension to restrict to it's own parser tests. In fact you can use
parserTests.php on a parser test file before you even register it. Making it
very useful for adding tests to an extension for the first time.
- Tests can be filtered by regexp; Useful to re-run the same set of tests over
and over when you are debugging something specific.
- I haven't tried it yet. But apparently parserTests.php can record to a
database and compare against it. From what I understand, useful to check for
fixes/regressions.
- parserTests.php can run disabled tests. Useful to check for tests that were
once disabled but happen to have been fixed by some recent commit.
- parserTests.php runs in around 30s. While the PHPUnit parser tests take about
3m to run (perhaps due to fuzz tests). This can make a really big difference
with you running tests over and over during development.

So basically in practice I find that the PHPUnit implementation's one purpose
is Jenkins integration. While parserTests is superior in every way for use
during actual development.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to