Comments (10)
Just rename them to *TestCase
from paraunit.
I've already encountered this issue.
Right now, the main issue is that I don't read inside the test files like PHPUnit does, so I'm not able to discern abstract from non-abstract classes. I solved this issue before with a naming convention, making abstract classes not caught up by the prefix/suffix settings of PHPUnit.
I'm open to suggestions; if anyone has an approach to avoid those problems, I'm all ears!
from paraunit.
We follow Symfony convention too.
Prefix abstract classes with Abstract. Please note some early Symfony classes do not follow this convention and have not been renamed for backward compatibility reasons. However all new abstract classes must follow this naming convention;
I think it's ok to make this prefix default one
from paraunit.
Then, you can hotfix this changing the XML config, blacklisting the tests that have this prefix, right?
I'm not sure if blacklisting by default in Paraunit is a good idea, I can't assume that that convention is always used; as an example, I have a AbstractEntityTest.php
in a project of mine, but the test is not abstract, the tested class is (well, the tested features, through child classes).
from paraunit.
Ok, but let's leave this issue open, just not to forget to skip abstract test suites somehow (check using AST maybe?)
from paraunit.
I don't know how to do that, and I'm from mobile so my Google-fu is somewhat limited right now..but definitely yes, I don't want to close this issue.
I would like to remove abstract test classes from the execution queue beforehand, but only if that is possible without impacting too much on performances. Otherwise, I would prefer an other approach, just catching those cases afterwards, while analyzing the test outcome. I need to investigate what outcome I get via logs and exit code when I wrongly try to execute PHPUnit over an abstract test class.
from paraunit.
This could just take avanage of phpunit's parsing.
phpunit --list-tests
That will give you all the runable tests.
from paraunit.
Thanks @yisraeldov but unfortunately that outputs the FQCN, which is no use for Paraunit: I cannot launch tests from the class name, I need the file name...
from paraunit.
@Jean85 https://blog.wyrihaximus.net/2016/10/utilizing-composers-classloader-to-get-a-class-contents/
from paraunit.
That unfortunately iwouldn't always work. PHPUnit works event with classes that have broken the PSR-0/4 autoloader, or even files that do not contains classes, like the PHPT tests. That would not work with that approach.
OTOH, it would be possible to parse that output anyway and act on it, but I fear that it would be slow...
from paraunit.
Related Issues (20)
- Implement passthrough option
- Re evaluate PHPUnit CLI options
- Change injection point
- Differentiate between test outcome and issue
- Use autowiring
- Remove AbstractEvent
- Simplify Process objects
- Mark tests with coverage missing
- Handle `--column` option
- Handle all `--display-*` options HOT 1
- Handle all `--stop-on-*` options HOT 1
- Handle `--exclude-testsuite` and `--test-suffix` options
- Handle `--order-by` and `--random-order-seed` options
- Handle `--warm-coverage-cache` option
- Handle `--log-junit` option HOT 5
- Implement `--print-failed-early` option for version 1.x
- PHPUnit version visibility
- PHPUnit's string comparison diff is not handled by ParaUnit HOT 2
- PHPUnitError event is not handled
- crashing on --exclude-group HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paraunit.