Comments (6)
Good idea 👍, but unfortunately I'm not using TC.
from tester.
My personal take would be to enrich the API with some sort of testStarted
callback (similar to what I have done here), or a timing property as you suggested. That would enable anybody improve whatever reporter they are using. It could even enable some improvements of CLI reporter, as you could see which tests are in progress.
Also having more outputs would be useful, possibly just by passing more -o
arguments (eg. -o machine.xml -o human.html
).
As for the TeamCity OutputHandler, I'm not sure if Teamcity is so widely used that it is beneficial to bake its OutputHandler directly into Tester. Maybe it would be better to make a list or a repository of "recommended" output handlers. That would hopefully enable some decentralisation so that you wouldn't have to maintain an OutputHandler for each CI/CD solution, but rather "outsource" that to individual maintainers.
from tester.
Seems to me better to record start/stop event time as close to reality as possible. Moreover, adding new OutputHandler interface method is a big one BC break.
Also having more outputs would be useful, possibly just by passing more -o arguments (eg. -o machine.xml -o human.html).
Are you sure about -o
? As I read your article, multiple --coverage
would be handy. Anyway, for multiple -o
is there #329 PR.
And about integrating TC into Tester directly... that's always a question. You mentioned, that Jiří Pudil uses it for PhpStorm plugin (@jiripudil Is that correct, that PhpStorm uses TC format internally too?). I think that better support for such wide-used tool as PhpStorm is worth it.
from tester.
Seems to me better to record start/stop event time as close to reality as possible. Moreover, adding new OutputHandler interface method is a big one BC break.
I don't know much timing error would change between callback and property approach. My guess is that most of the time, you'd want a precision of only tens of miliseconds, below that, you probably would get a lot of noise anyway, because of varying system load etc.
I used an opt-in interface in my solution so that back-compatibility wouldn't be broken, as old OutputHandlers could still use the old interface. Of course, it's one more near-useless interface that way...
Are you sure about -o?
You're right, I should be thinking more and typing less :-) Multiple--coverage
is what would be useful in this scenario.
Good point about PHPStorm. That might make it worthwhile to integrate the output into the core.
from tester.
Is that correct, that PhpStorm uses TC format internally too?
That is indeed correct. Test duration is a nice addition too 👍 I agree with @veproza that reporting the actual start of the test would pave the way for a better UX, but I also agree with @milo that it's an unnecessary BC break too soon after the last major release. I'd postpone that until a 3.0 release is considered, and stick with a property in Test for now.
from tester.
I closing for lack of interest.
from tester.
Related Issues (20)
- FileMock test fails in PHP 7.3.0beta3 HOT 1
- Missing response code assertion HOT 2
- Class 'SimpleXMLElement' not found
- bypassFinals: touch() expects parameter 2 to be integer, null given
- bypassFinals: breaks file locking HOT 1
- E_USER_WARNING: File's modification time is in the future. Cannot update it: touch(): Tester\FileMock::stream_metadata is not implemented! HOT 4
- Support for minor distinction of exceptions HOT 3
- Annotation like @accessPrivateMethod HOT 3
- Add warning about wrong regex form in Assert::match() in tester output HOT 1
- PHP 7.4 support HOT 4
- Runner: Waiting for last async Job causes high CPU usage HOT 1
- Wrong usage of ANSI terminal colors HOT 2
- dataProvider & Tester\DataProvider::testQuery() must be of the type string
- fwrite to php://stderr throws E_NOTICE on php 7.4 HOT 21
- Export coverage to Cobertura xml format HOT 1
- `\Tester\TestCase::tearDown` is not executed on php crash HOT 3
- Tracking deprecations HOT 6
- Assert::type should accept native type names "boolean" and "double" HOT 1
- Cove coverage HTML report has all PHP sources compacted to only one line HOT 3
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 tester.