Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract output into a dedicated class #20

Merged
merged 17 commits into from
Apr 22, 2023
Merged

Extract output into a dedicated class #20

merged 17 commits into from
Apr 22, 2023

Conversation

thekid
Copy link
Member

@thekid thekid commented Apr 16, 2023

See #13, this is the basis for being able to extract test run output.

Usage

The -r command line argument controls the used report:

# Default
$ xp test src/test/php/

# Explicitely setting report to `Grouped`, which is the default
$ xp test -r Grouped src/test/php/

# Using multiple reports (the `JSON` class is not part of this pull request!)
$ xp test -r Dots -r JSON,report.json src/test/php/

Change

CI now uses the compact Dots report as seen on the right-hand side.

Before and after CI output

@thekid
Copy link
Member Author

thekid commented Apr 16, 2023

Should we change the concept introduced here from output to report? See the following:

@@ -24,6 +24,9 @@ public function __construct($arg, $selection= null) {
/** @return string */
public function name() { return $this->context->type->name(); }

/** @return ?string */
public function declaringFile() { return $this->context->type->class()->reflect()->getFileName(); }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should accessing the file name be part of the https://github.com/xp-framework/reflection API?

@thekid thekid added the enhancement New feature or request label Apr 22, 2023
@thekid thekid mentioned this pull request Apr 22, 2023
4 tasks
@thekid thekid merged commit e2d74fd into main Apr 22, 2023
@thekid thekid deleted the refactor/extract-ouput branch April 22, 2023 17:56
@thekid
Copy link
Member Author

thekid commented Apr 23, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant