Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Provide a better way for command-line users to run the koans #76

Open
coproduto opened this issue Apr 18, 2017 · 3 comments
Open

Provide a better way for command-line users to run the koans #76

coproduto opened this issue Apr 18, 2017 · 3 comments

Comments

@coproduto
Copy link

coproduto commented Apr 18, 2017

I understand the koans were mostly thought out for IDE users, but I believe there are many people who prefer doing their coding work with just the command line and text editors such as me.

The problem with running the koans using ./gradlew test is that the output is very messy, and you need to sift through it in order to find out if the test you were working on has passed. Of course, you can run the individual test you're working on, but a lot of Kotlin newcomers are also newcomers to Gradle and won't know how to do that.

Most other "koans" projects such as ruby-koans provide a script you can run which will tell you the first koan to fail among all of them and no other information. I find that to be the best way to have koans gently introduce newcomers to a language. It would be nice to have a script like that for kotlin-koans too.

@coproduto
Copy link
Author

Update: I'm actually working on a solution for this as a way to stretch my fledgling Kotlin skills. I'll open a pull request as soon as I have something real.

@nvlled
Copy link
Contributor

nvlled commented Jun 6, 2017

Not a pure commandline solution, but there is a test result summary in HTML in the build output: build/reports/tests/test/index.html

Edit: You can choose what tests to run by with the --test flag:

$ ./gradlew test --tests i_*          # run tests in part 1
$ ./gradlew test --tests ii_*          # run tests in part 2
$ ./gradlew test --tests ii_*22*          # run test number 22 in part 2

@weklund
Copy link

weklund commented Aug 9, 2017

@nvlled Found an issue with a version of Gradle, couldn't run those tests with the flag.

https://issues.gradle.org/browse/GRADLE-3112

The only workaround I found was having Android Studio run the ones I want manually.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants