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

feat: pluggable test runner #196

Merged
merged 41 commits into from
Apr 29, 2022
Merged

feat: pluggable test runner #196

merged 41 commits into from
Apr 29, 2022

Conversation

imrekoszo
Copy link
Contributor

@imrekoszo imrekoszo commented Mar 24, 2022

Add the option to supply a custom test runner.

A previous version of this PR contained an example implementation using kaocha, I will recreate that outside of this repo and link it.

Todo:

  • documentation
    • document plugin and constructor interface
    • document how to pass extra args to test runner using user-input (focus) and stuff like verbose
  • create repo for kaocha impl that was pulled from this PR
  • create issue about namespaces vs paths
  • later perhaps
    • extend info integration for test discovery? potentially with a flag that hides a potentially slow tests-present?
      • this is proving to be somewhat difficult as the source data for this gets collected rather early:
        path-entries (extract/from-unenriched-project is-dev paths disk-paths settings)
        component-names-src (select/names path-entries c/component? c/src? c/exists?)
        component-names-test (select/names path-entries c/component? c/test? c/exists?)
        component-names (cond-> {}
        (seq component-names-src) (assoc :src component-names-src)
        (seq component-names-test) (assoc :test component-names-test))
        base-names-src (select/names path-entries c/base? c/src? c/exists?)
        base-names-test (select/names path-entries c/base? c/test? c/exists?)
        base-names (cond-> {}
        (seq base-names-src) (assoc :src base-names-src)
        (seq base-names-test) (assoc :test base-names-test))

@imrekoszo imrekoszo changed the title WIP pluggable test runner feat: pluggable test runner Mar 28, 2022
@imrekoszo imrekoszo marked this pull request as ready for review April 6, 2022 14:47
@furkan3ayraktar furkan3ayraktar added core Related to core functionality of Polylith cli Related to Polylith cli labels Apr 7, 2022
@SavageMessiah
Copy link

Thank you for working on this, I've just started porting our 150k line codebase over to polylith and management has been breathing down my neck about code coverage stats 😓 .

@imrekoszo
Copy link
Contributor Author

coverage stats 😓 .

Glad someone else finds this useful :) I haven't yet set up coverage on our end with this, so if you end up with code you can share that would be great!

@@ -31,14 +30,14 @@
{:keys [top-namespace interface-ns color-mode]} settings
suffixed-top-ns (common/suffix-ns-with-dot top-namespace)
interfaces (interfaces/calculate components)
interface-names (apply sorted-set (filter identity (mapv :name interfaces)))
interface-names (into (sorted-set) (keep :name) interfaces)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Awesome that you find and improve things like this!

@tengstrand tengstrand merged commit abd20bb into polyfy:master Apr 29, 2022
@imrekoszo
Copy link
Contributor Author

coverage

@SavageMessiah in case you use kaocha, I managed to get cloverage working through polylith-kaocha

@imrekoszo imrekoszo deleted the kaocha branch April 30, 2022 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to Polylith cli core Related to core functionality of Polylith
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants