No, I didn't. It looks like no one cares... I haven't checked against the 
latest version though.

If I run `gradlew test`, or rather `./gradlew cleanTest test -i`, I can see 
no tests are executed:

`````
...
> Task :api:cas-server-core-api:test SKIPPED
Skipping task ':api:cas-server-core-api:test' as task onlyIf is false.
...
`````

But that is probably no surprise, because "simple tests execution" is 
disabled in the "gradle/tests.gradle" file:

`````
test {
    enabled = false
    onlyIf = {
        false
    }
}
`````

Luckily, this is not a blocker for me right now.

On Tuesday, 9 November 2021 at 20:51:47 UTC+1 Pablo Vidaurri wrote:

> Did you find a solution to this? What happens for you when you run
>    gradlew test
> ?
>
> On Saturday, April 3, 2021 at 4:56:21 AM UTC-5 [email protected] wrote:
>
>> Hello,
>>
>> this post is may be interesting for CAS contributors...
>>
>> I try to run CAS's JUnit-based unit tests from command line, i. e. via 
>> Gradle - see 
>> https://apereo.github.io/cas/development/developer/Test-Process.html#unit--integration-testing.
>>  
>> I've run into the following problems though that are not present in the 
>> 6.2.x branch, so it seems like a novelty in the 6.3.x and master branches.
>>
>> Note that I'm intentionally leaving just the necessary command line 
>> parameters in the examples below in order to keep it short.
>>
>> 1) *Running tests just from one module is not possible*
>>
>> This is not documented, yet it is working in 6.2.x. For example:
>>
>> $ ./gradlew :core:cas-server-core-authentication 
>> {cleanTest,testSimple} --info
>>
>> Unexpected result:
>>
>> ...
>> > Task :core:cas-server-core-authentication:testSimple SKIPPED
>> Skipping task ':core:cas-server-core-authentication:testSimple' as task 
>> onlyIf is false.
>> :core:cas-server-core-authentication:testSimple (Thread[Execution worker 
>> for ':',5,main]) completed. Took 0.0 secs.
>>
>> 2) *Running a single test is not possible*
>>
>> For example (note that the `--category` switch seems to be mandatory, 
>> there is probably some technical reason behind always filtering tests by 
>> their `@Tag` annotation):
>>
>> $ ./testcas.sh --category simple --test 
>> org.apereo.cas.authentication.handler.ConvertCasePrincipalNameTransformerTests
>>
>> ... which runs:
>>
>> $ ./gradlew cleanTest testSimple --tests 
>> "org.apereo.cas.authentication.handler.ConvertCasePrincipalNameTransformerTests"
>>
>> Unexpected result:
>>
>> > Task :api:cas-server-core-api-configuration-model:testSimple FAILED
>> Started running test suite [Gradle Test Run 
>> :api:cas-server-core-api-configuration-model:testSimple] @ Sat Apr 03 
>> 11:31:45 CEST 2021
>>
>> Results for test suite [Gradle Test Run 
>> :api:cas-server-core-api-configuration-model:testSimple]: SUCCESS @ Sat Apr 
>> 03 11:31:45 CEST 2021
>> (0 tests, 0 successes, 0 failures, 0 skipped)
>>
>> FAILURE: Build failed with an exception.
>>
>> * What went wrong:
>> Execution failed for task 
>> ':api:cas-server-core-api-configuration-model:testSimple'.
>>
>> ---
>>
>> I tried to comment out various suspicious parts within the 
>> "cas/gradle/tests.gradle" file and also passing various switches to the 
>> Gradle build, but nothing worked so far.
>>
>> So can anybody help with this? Until then, launching just selected tests 
>> from within *IDEA*, via its JUnits runner, seems to be the working way, 
>> and maybe that this could also be *recommended* for launching tests in 
>> an ad-hoc style in the CAS docs?
>>
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/fa916997-ed27-4bf5-b716-4b316ab07d6en%40apereo.org.

Reply via email to