Kotlin / kotlinx-kover

Apache License 2.0
1.37k stars 53 forks source link

Binary file not being generated #597

Closed MedetZhakupov closed 4 months ago

MedetZhakupov commented 6 months ago

When I run below command it succeeds but no binary file being generated

commandLine(
                        "java",
                        "-jar",
                        koverJar.canonicalPath,
                        "instrument",
                        outputDir,
                        "--dest",
                        outputDir,
                )

Am I missing something?

shanshin commented 6 months ago

Hi, instrument command only modifies the class-files.

Could you please clarify, what binary file do you have in mind and at what time do you expect it?

MedetZhakupov commented 6 months ago

What I want to accomplish I want to analyse only changed files in the PR and run coverage report and fail the CI if coverage is below certain percentage. How I am approaching it Based on the documentation this is what I am doing. 1) I am getting list of changed files with below function in my build.gradle file

static String changedFiles() {
    def gitOutput = 'git diff --name-only master...'.execute().text
    def files = gitOutput.tokenize('\n').findAll { it.endsWith('.kt') }.join(',')
    println "git diff files => $files"
    return files
}

2) I am calling below command to run instrument

tasks.withType(KotlinCompile).configureEach {
    doLast {
        def outputDir = destinationDirectory.get().asFile
        def cliConfig = configurations.named("koverCli")
        def koverJar = cliConfig.get().filter { it.name.startsWith("kover-cli") }.singleFile

        exec {
            commandLine(
                    "java",
                    "-jar",
                    koverJar.canonicalPath,
                    "instrument",
                    outputDir,
                    "--dest",
                    outputDir,
                    "--include",
                    changedFiles()
            )
        }
    }

3) I run for example gradle command ./gradlew assembleFranceDevDebug and expect script above to produce *.ic file. *_And in this step nothing is happening. Execution succeeds but no `.ic` file being produced_** 4) if step 3 succeeds I am planning to run below command right after it

tasks.withType(KotlinCompile).configureEach {
    doLast {
        def outputDir = destinationDirectory.get().asFile
        def cliConfig = configurations.named("koverCli")
        def koverJar = cliConfig.get().filter { it.name.startsWith("kover-cli") }.singleFile
        if (koverJar) {
            exec {
                commandLine(
                        "java",
                        "-jar",
                        koverJar.canonicalPath,
                        "report",
                        "--classfiles",
                        outputDir,
                        "--src",
                        "${layout.buildDirectory}/kover/bin-reports/testBelgiumDevDebugUnitTest.ic",
                        "--html",
                        "${outputDir.absolutePath}/kover-report.html",
                        "--xml",
                        "${outputDir.absolutePath}/kover-report.xml",
                )
            }
        } else {
            println "Kover CLI JAR not found in dependencies"
        }
    }
}

5) Parse xml report and extract coverage percentage

shanshin commented 6 months ago

I run for example gradle command ./gradlew assembleFranceDevDebug and expect script above to produce .ic file. And in this step nothing is happening. Execution succeeds but no .ic file being produced

Instrumentation is intended to modify classes. It cannot evaluate coverage, because Kover isn't a static analyzing tool, and it requires running instrumented classes.

It is necessary to run tests over the instrumented classes. And it will be possible to get a binary coverage report from these running tests, there are several ways to do this. Do not forget to add a dependency on org.jetbrains.kotlinx:kover-offline-runtime so that the coverage measurement works correctly.

Please note that if the tests being run are connected tests (or are also called Android instrumented tests), then you will need to transfer the binary report from the emulator (or Android device) to the host machine so that this file can be read from the build script.

MedetZhakupov commented 6 months ago

First of all thanks a lot for prompt responses. Based on my understanding the sequence should be following: 1) Run unit tests 2) Instrument runs after completion of unit tests and generates *.ic file 3) Run report to analyse generated *.ic file

Based on above hypothesis of mine I came up this below script looking at the examples. And I run unit tests with task ./gradlew clean app:testBelgiumDevDebugUnitTest which runs successfully if there is no below script but when I run it with below script half of the unit tests fail. What could be the reason?

dependencies {
    add("koverCli", libs.kover.cli)
    runtimeOnly(libs.kover.offline.runtime)
}

File koverCliJar() {
    def cliConfig = configurations.named("koverCli")
    return cliConfig.get().filter { it.name.startsWith("kover-cli") }.singleFile
}

tasks.withType(KotlinCompile).configureEach {
    doLast {
        def outputDir = destinationDirectory.get().asFile
        def koverJar = koverCliJar()
        if (koverJar) {
            println "Kover Offline Runtime Execution starting"
            def args = []

                args << "java"
                args << "-jar"
                args << koverJar.canonicalPath
                args << "instrument"
                args << outputDir
                args << "--dest"
                args << outputDir
                args << "--hits"

                def changedFiles = changedFiles()
                changedFiles.forEach { file ->
                    args << "--include"
                    args << file
                }
            exec { commandLine(args) }
            println "Kover Offline Runtime Execution finished"
        } else {
            println "Kover CLI JAR not found in dependencies"
        }
    }
}

def binaryReport = layout.buildDirectory.file("kover/report.ic").get().asFile

tasks.withType(Test).configureEach {
    // set system property for binary report path
    systemProperty("kover.offline.report.path", binaryReport.absolutePath)
}
shanshin commented 6 months ago

Have you added an org.jetbrains.kotlinx:kover-offline-runtime dependency to your app?

If yes, and the error still occurs, please send this error and its full stack-trace.

MedetZhakupov commented 6 months ago

Yes I did add the dependency. Here is the stacktrace

Task :app:testBelgiumDevDebugUnitTest

com.privatebanking.app.DeviceDetailsTest > testGetDeviceDetailsObject FAILED
    java.lang.ExceptionInInitializerError at DeviceDetailsTest.java:36
        Caused by: java.lang.NullPointerException at DeviceDetailsTest.java:36

com.privatebanking.app.PrivateBankingApplicationTest > testGetSetTopActivity FAILED
    java.lang.NoClassDefFoundError at PrivateBankingApplicationTest.java:24
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.PrivateBankingApplicationTest > testGetInstance FAILED
    java.lang.NoClassDefFoundError at PrivateBankingApplicationTest.java:24
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.accounts.operations.viewmodel.AccountOperationsSearchViewModelTest > Filter operations - Amount more than 475 FAILED
    junit.framework.AssertionFailedError at AccountOperationsSearchViewModelTest.kt:258

com.privatebanking.app.accounts.operations.viewmodel.AccountOperationsSearchViewModelTest > Load operations - Success FAILED
    junit.framework.AssertionFailedError at AccountOperationsSearchViewModelTest.kt:53

com.privatebanking.app.accounts.operations.viewmodel.AccountOperationsSearchViewModelTest > Unload all data FAILED
    java.lang.NoClassDefFoundError at AccountOperationsSearchViewModelTest.kt:428
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.accounts.operations.viewmodel.AccountOperationsSearchViewModelTest > Filter operations - Search query is Bezos FAILED
    junit.framework.AssertionFailedError at AccountOperationsSearchViewModelTest.kt:349

com.privatebanking.app.accounts.operations.viewmodel.AccountOperationsSearchViewModelTest > Filter operations - Amount between 400 and 450 FAILED
    junit.framework.AssertionFailedError at AccountOperationsSearchViewModelTest.kt:305

com.privatebanking.app.accounts.operations.viewmodel.AccountOperationsSearchViewModelTest > Filter operations - Credit only FAILED
    junit.framework.AssertionFailedError at AccountOperationsSearchViewModelTest.kt:83

com.privatebanking.app.accounts.operations.viewmodel.AccountOperationsSearchViewModelTest > Filter operations - Amount less than 450 FAILED
    junit.framework.AssertionFailedError at AccountOperationsSearchViewModelTest.kt:197

com.privatebanking.app.accounts.operations.viewmodel.AccountOperationsSearchViewModelTest > Filter operations - Debit only FAILED
    junit.framework.AssertionFailedError at AccountOperationsSearchViewModelTest.kt:126

com.privatebanking.app.accounts.operations.viewmodel.AccountOperationsViewModelTest > Load operations - Success FAILED
    junit.framework.AssertionFailedError at AccountOperationsViewModelTest.kt:50

com.privatebanking.app.accounts.operations.viewmodel.AccountOperationsViewModelTest > Load operations - Success Check Form FAILED
    junit.framework.ComparisonFailure at AccountOperationsViewModelTest.kt:65

com.privatebanking.app.login.DeviceRegistrationImplTest > testIsUserMigratedFaslse FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37
    java.lang.NullPointerException at DeviceRegistrationImplTest.java:104

com.privatebanking.app.login.pinpages.choosepin.ChoosePinFragmentTest > testVerifyNewPin FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37
    org.mockito.exceptions.misusing.NotAMockException at ChoosePinFragmentTest.java:128

com.privatebanking.app.login.pinpages.choosepin.ChoosePinViewModelTest > verifyOtpHttpExceptionPostTrueForTechnicalError FAILED
    java.lang.InternalError at ChoosePinViewModelTest.kt:206

com.privatebanking.app.login.pinpages.choosepin.ChoosePinViewModelTest > verifyOtpSuccessPostsTrueForVerifySuccessStateEvent FAILED
    java.lang.NoClassDefFoundError at ChoosePinViewModelTest.kt:206
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.choosepin.ChoosePinViewModelTest > verifyOtpSuccessFailurePostsFalseForVerifySuccessStateEvent FAILED
    java.lang.NoClassDefFoundError at ChoosePinViewModelTest.kt:206
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.choosepin.ChoosePinViewModelTest > sendDeviceDetailsSuccessFailureDoesNotCallBusinessEvent FAILED
    java.lang.NoClassDefFoundError at ChoosePinViewModelTest.kt:206
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.choosepin.ChoosePinViewModelTest > sendDeviceDetailsSuccessPostsTrueForSendDetailsSuccessStateEvent FAILED
    java.lang.NoClassDefFoundError at ChoosePinViewModelTest.kt:206
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.choosepin.ChoosePinViewModelTest > sendDeviceDetailsHttpExceptionDoesNotCallBusinessEvent FAILED
    java.lang.NoClassDefFoundError at ChoosePinViewModelTest.kt:206
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.choosepin.ChoosePinViewModelTest > sendDeviceDetailsHttpExceptionPostTrueForTechnicalError FAILED
    java.lang.NoClassDefFoundError at ChoosePinViewModelTest.kt:206
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.choosepin.ChoosePinViewModelTest > sendDeviceDetailsSuccessFailurePostsFalseForSendDetailsSuccessStateEvent FAILED
    java.lang.NoClassDefFoundError at ChoosePinViewModelTest.kt:206
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.choosepin.ChoosePinViewModelTest > sendDeviceDetailsSuccessCallsSendBusinessEvent FAILED
    java.lang.NoClassDefFoundError at ChoosePinViewModelTest.kt:206
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.choosepin.ChoosePinViewModelTest > sendBusinessEventCallsRepository FAILED
    java.lang.NoClassDefFoundError at ChoosePinViewModelTest.kt:206
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.login.LogonPinViewModelTest > whenPulsarLogonSuccessButNoPortalName_ThenPostFalseAndResponseForPulsarLogonSuccessStateEvent FAILED
    java.lang.NoClassDefFoundError at LogonPinViewModelTest.kt:209
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.login.LogonPinViewModelTest > whenSetPulsarAuthCookiesThrowsException_ThenPostFalseForPulsarAuthCookiesSuccessStateEvent FAILED
    java.lang.NoClassDefFoundError at LogonPinViewModelTest.kt:209
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.login.LogonPinViewModelTest > whenPulsarLogonSuccessContainsPortalName_ThenSetPulsarAuthCookies FAILED
    java.lang.NoClassDefFoundError at LogonPinViewModelTest.kt:209
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.login.LogonPinViewModelTest > whenPulsarLogonThrowsException_ThenPostFalseAndJsonObjectForPulsarLogonSuccessStateEvent FAILED
    java.lang.NoClassDefFoundError at LogonPinViewModelTest.kt:209
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.login.LogonPinViewModelTest > whenSetPulsarAuthCookiesSuccessFailure_ThenPostFalseForPulsarAuthCookiesSuccessStateEvent FAILED
    java.lang.NoClassDefFoundError at LogonPinViewModelTest.kt:209
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.login.LogonPinViewModelTest > whenPulsarLogonSuccessContainsPortalName_ThenSendBusinessEvent FAILED
    java.lang.NoClassDefFoundError at LogonPinViewModelTest.kt:209
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.login.LogonPinViewModelTest > whenPulsarLogonSuccessContainsPortalNameAndIsCorporateUser_ThenCallLoginManager FAILED
    java.lang.NoClassDefFoundError at LogonPinViewModelTest.kt:209
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.login.pinpages.login.LogonPinViewModelTest > sendBusinessEventCallsRepository FAILED
    java.lang.NoClassDefFoundError at LogonPinViewModelTest.kt:209
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.logout.LogoutRepositoryTest > testShowLogoutPopup FAILED
    java.lang.NoClassDefFoundError at null:-2
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.logout.LogoutRepositoryTest > testNavigateToLogin FAILED
    java.lang.NoClassDefFoundError at null:-2
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.logout.LogoutRepositoryTest > testOnSuccess FAILED
    java.lang.NoClassDefFoundError at null:-2
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.logout.LogoutRepositoryTest > testDoLogout FAILED
    java.lang.NoClassDefFoundError at null:-2
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.logout.LogoutRepositoryTest > testOnFailure FAILED
    java.lang.NoClassDefFoundError at null:-2
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.IbanFormattingTextWatcherTest > testAddCharacterAtNormalPosition FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.IbanFormattingTextWatcherTest > testPasteString FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.IbanFormattingTextWatcherTest > testAddCharacterAtSpacePosition FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateName_valid_name_with_space FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateSepaCountryIban_invalid_space FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidatePolandPays_WithoutData FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateSepaCountryIban_invalid FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateSepaCountryIban_valid_space FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateDebtorSelection_null FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateName_valid_name FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateName_valid_name_with_space_and_capital FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidatePolandAddress_WithData FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateSepaCountryIban_null FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateSepaCountryIban_empty_json_sepa_county FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateEuropeanStructure_disableESN FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateIban_valid_space FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidatePolandPays_WithData FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateIban_special_char FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateIban_valid FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidatePolandPays_WithSpaces FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateIban_lessthan_4_char FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateAmount_invalid_upper_limit_be FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateIban_valid_sepa FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateAmount_invalid_lower_limit FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateAmount_invalid_upper_limit FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateDebtorSelection FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateAmount_valid_0_01 FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateAmount_valid_1_00 FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateCreditorSelection_null FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateCreditorSelection FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateAmount_upper_limit_be FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateName_invalid_name FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateEuropeanStructure FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidatePolandAddress_WithSpaces FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateSepaCountryIban_empty_sepa_county FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateAmount_valid FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateIban_invalid_empty FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidatePolandAddress_WithoutData FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateSepaCountryIban_empty FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateSepaCountryIban_valid FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateName_empty_name FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateEuropeanStructure_false FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateIban_invalid FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateSepaCountryIban_empty_country_json_sepa FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentInitiationValidationsTest > testValidateAmount_lower_limit_be FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testFormatEuropeanStructure_11digit FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testFormatEuropeanStructure_12digit FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetDebtorAccountType FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testConvertDateToScheduleDate FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testIsNeuflizeOBC FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetUrl_CREDITOR_EXTERNAL FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testIsSinglePaymentNullValue FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testIsInternationalPayment FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testIsSinglePayment FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testIsSinglePaymentEmptyValue FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testIsInternationalPaymentEmptyValue FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testIsRecurringPaymentNullValue FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testConvertDateToISODate FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testIsRecurringPaymentEmptyValue FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetUrl_DEBTOR FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetDebtorAccountType_investment FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testIsSinglePaymentWrongValue FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testIsInternationalPaymentWrongValue FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testIsInternationalPaymentNullValue FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testIsRecurringPayment FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testIsRecurringPaymentWrongValue FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetDebtorAccountType_current FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetTomorrowDate FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetDebtorAccountType_empty FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetUrl_CREDITOR_INTERNAL FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testFormatEuropeanStructure_empty FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetDebtorAccountType_ssa FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetCountryLocaleCode_de FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetCountryLocaleCode_en FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetCountryLocaleCode_fr FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetCountryLocaleCode_nl FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testIsPrivateBankingBE FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testFormatEuropeanStructure_empty_again FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetCountryLocaleCode_nl_be FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetCountryLocaleCode_nl_en FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.common.PaymentUtilsTest > testGetCountryLocaleCode_nl_fr FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.service.DebtorCreditorServiceImplTest > testInternalCreditorAccountApiCall_onFailure FAILED
    java.lang.NoClassDefFoundError at DebtorCreditorServiceImplTest.kt:75
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.service.DebtorCreditorServiceImplTest > testDebtorAccountApiCall_onSuccess FAILED
    java.lang.NoClassDefFoundError at DebtorCreditorServiceImplTest.kt:75
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.service.DebtorCreditorServiceImplTest > testExternalCreditorAccountApiCall_onSuccess FAILED
    java.lang.NoClassDefFoundError at DebtorCreditorServiceImplTest.kt:75
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.service.DebtorCreditorServiceImplTest > testDebtorAccountApiCall_onFailure FAILED
    java.lang.NoClassDefFoundError at DebtorCreditorServiceImplTest.kt:75
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.service.DebtorCreditorServiceImplTest > testExternalCreditorAccountApiCall_onFailure FAILED
    java.lang.NoClassDefFoundError at DebtorCreditorServiceImplTest.kt:75
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.service.DebtorCreditorServiceImplTest > testInternalCreditorAccountApiCall_onSuccess FAILED
    java.lang.NoClassDefFoundError at DebtorCreditorServiceImplTest.kt:75
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.BeneficiaryViewModelTest > updateBeneficiaryWithExistingIbanShouldReturnError FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.BeneficiaryViewModelTest > twoCharacterNameShouldReturnError FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.BeneficiaryViewModelTest > invalidCharacterInNameShouldReturnError FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.BeneficiaryViewModelTest > emptyIbanShouldReturnError FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.BeneficiaryViewModelTest > nameAndIbanValidationErrorShouldReturnDuplicateErrorMessage FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.BeneficiaryViewModelTest > emptyNameShouldReturnError FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.BeneficiaryViewModelTest > deleteExistingBeneficiaryShouldReturnSuccess FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.BeneficiaryViewModelTest > invalidIbanShouldReturnError FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.BeneficiaryViewModelTest > updateBeneficiaryWithoutChangeShouldReturnNoUpdate FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.BeneficiaryViewModelTest > updateBeneficiaryIbanShouldReturnSuccess FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.BeneficiaryViewModelTest > duplicateIbanShouldReturnError FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.BeneficiaryViewModelTest > validNameAndIbanShouldReturnSuccesResult FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.BeneficiaryViewModelTest > seventyOneCharacterNameShouldReturnError FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testSetDebtorAccountList FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testSetListener FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testDebtorDetailsDetailsAreNotFetchedIfDebtorListHasData FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testGetDebtorAccountList FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testMakeExternalCreditorAccountApiCallSuccessWithData FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testSetSelectedCreditorAccount FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testMakeInternalCreditorAccountApiCallRemoveDebtorAccount FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testMakeDebtorAccountApiCallEmptyResponse FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testMakeInternalCreditorAccountApiCallFailure FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testMakeExternalCreditorAccountApiCall_HashTagAtLast FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testSetSelectedDebtorAccount FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testClearExternalCreditorData FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testMakeExternalCreditorAccountApiCallFailure FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testMakeDebtorAccountApiCallFailureResponse FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testMakeExternalCreditorAccountApiCallTwice FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testMakeDebtorAccountApiCallWithDataResponse FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testMakeInternalCreditorAccountApiCallEmptyResponse FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testExternalCreditorDetailsDetailsAreNotFetchedIfInternalCreditorHasData FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testGetInternalCreditorAccountList FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testSetInternalCreditorAccountList FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testMakeInternalCreditorAccountApiCallRemoveSingleCreditAccount FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.DebtorCreditorAccountListViewModelTest > testMakeInternalCreditorAccountApiCallSuccessWithData FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.PaymentFlowViewModelTest > testInitiateGenerateChallenge_success FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.PaymentFlowViewModelTest > testSigningSignObject_failure FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.PaymentFlowViewModelTest > testFetchSignObjectSuccess FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.PaymentFlowViewModelTest > testInitiatePaymentSuccess FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.PaymentFlowViewModelTest > testInitiateGenerateChallenge_failure FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.PaymentFlowViewModelTest > testSigningSignObject_Success FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.PaymentFlowViewModelTest > testFetchSignObjectFailure FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.PaymentFlowViewModelTest > testInitiatePaymentFailure FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.PaymentFlowViewModelTest > testSigningSignObject_Success_not_Fully_signed FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.SharedViewModelTest > testInitiateSigningFailure FAILED
    java.lang.NoClassDefFoundError at SharedViewModelTest.kt:88
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.SharedViewModelTest > testInitiateSigningSuccessTrue FAILED
    java.lang.NoClassDefFoundError at SharedViewModelTest.kt:88
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.SharedViewModelTest > testInitiateTransactionSigningSuccess FAILED
    java.lang.NoClassDefFoundError at SharedViewModelTest.kt:88
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.SharedViewModelTest > testInitiateTransactionSigningFailure FAILED
    java.lang.NoClassDefFoundError at SharedViewModelTest.kt:88
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.payments.viewmodel.SharedViewModelTest > testInitiateSigningSuccessFalse FAILED
    java.lang.NoClassDefFoundError at SharedViewModelTest.kt:88
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.tealium.AnalyticsRoutingTest > trackingIsCalled FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37
    java.lang.NoClassDefFoundError at AnalyticsRoutingTest.kt:91
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.tealium.AnalyticsRoutingTest > customEventTracking FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37
    java.lang.NoClassDefFoundError at AnalyticsRoutingTest.kt:91
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.utils.ConnectivityManagerTest > isConnected - networkInfo is not connected - returns false FAILED
    java.lang.NoClassDefFoundError at ConnectivityManagerTest.kt:180
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.utils.DeviceUtilityTest > testGetInstanceWhenNotNull FAILED
    java.lang.NoClassDefFoundError at DeviceUtilityTest.java:52
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37
    java.lang.NoClassDefFoundError at DeviceUtilityTest.java:69
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.utils.DeviceUtilityTest > testGetUniqueID FAILED
    java.lang.NoClassDefFoundError at DeviceUtilityTest.java:52
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37
    java.lang.NoClassDefFoundError at DeviceUtilityTest.java:69
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.utils.DeviceUtilityTest > testGetInstanceWhenNull FAILED
    java.lang.NoClassDefFoundError at DeviceUtilityTest.java:52
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37
    java.lang.NoClassDefFoundError at DeviceUtilityTest.java:69
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.utils.PlayStoreUtilTest > testRedirectToPlayStorePrivateBankingApp FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.utils.PlayStoreUtilTest > testRedirectToPlayStoreAnyApp FAILED
    java.lang.NoClassDefFoundError at null:-1
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.utils.UtilsTest > testGetAccountTypeIcon FAILED
    java.lang.NoClassDefFoundError at null:-2
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.utils.UtilsTest > testisPolandIBan_true FAILED
    java.lang.NoClassDefFoundError at null:-2
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.utils.UtilsTest > testFormatCurrency FAILED
    java.lang.NoClassDefFoundError at null:-2
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.utils.UtilsTest > testGetAccountTypeWithTranslation FAILED
    java.lang.NoClassDefFoundError at null:-2
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.utils.UtilsTest > getMaskedString FAILED
    java.lang.NoClassDefFoundError at null:-2
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.utils.UtilsTest > testisPolandIBan_false FAILED
    java.lang.NoClassDefFoundError at null:-2
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.utils.UtilsTest > testGetAppVersionCode FAILED
    java.lang.NoClassDefFoundError at null:-2
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

com.privatebanking.app.utils.UtilsTest > getVisibleFragment FAILED
    java.lang.NoClassDefFoundError at null:-2
        Caused by: java.lang.ExceptionInInitializerError at PrivateBankingApplication.kt:37

716 tests completed, 190 failed, 34 skipped

> Task :app:testBelgiumDevDebugUnitTest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:testBelgiumDevDebugUnitTest'.
> There were failing tests. See the report at: file:///Users/medetzhakupov/AndroidStudioProjects/bbs-private-banking-android/app/build/reports/tests/testBelgiumDevDebugUnitTest/index.html

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:testBelgiumDevDebugUnitTest'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:149)
        at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:147)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:135)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:337)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:324)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:317)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49)
Caused by: org.gradle.api.tasks.VerificationException: There were failing tests. See the report at: file:///Users/medetzhakupov/AndroidStudioProjects/bbs-private-banking-android/app/build/reports/tests/testBelgiumDevDebugUnitTest/index.html
        at org.gradle.api.tasks.testing.AbstractTestTask.handleTestFailures(AbstractTestTask.java:621)
        at org.gradle.api.tasks.testing.AbstractTestTask.handleCollectedResults(AbstractTestTask.java:483)
        at org.gradle.api.tasks.testing.AbstractTestTask.executeTests(AbstractTestTask.java:478)
        at org.gradle.api.tasks.testing.Test.executeTests(Test.java:692)
        at com.android.build.gradle.tasks.factory.AndroidUnitTest.executeTests(AndroidUnitTest.java:118)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
        at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:242)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:227)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:210)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:193)
        at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:166)
        at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:105)
        at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:44)
        at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:59)
        at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:56)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:56)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)
        at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:67)
        at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:37)
        at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
        at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
        at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
        at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:50)
        at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:28)
        at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.executeDelegateBroadcastingChanges(CaptureStateAfterExecutionStep.java:100)
        at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:72)
        at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:50)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:40)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:29)
        at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:166)
        at org.gradle.internal.execution.steps.BuildCacheStep.executeAndStoreInCache(BuildCacheStep.java:139)
        at org.gradle.internal.execution.steps.BuildCacheStep.lambda$executeWithCache$4(BuildCacheStep.java:106)
        at org.gradle.internal.execution.steps.BuildCacheStep.lambda$executeWithCache$5(BuildCacheStep.java:106)
        at org.gradle.internal.Try$Success.map(Try.java:164)
        at org.gradle.internal.execution.steps.BuildCacheStep.executeWithCache(BuildCacheStep.java:80)
        at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$0(BuildCacheStep.java:69)
        at org.gradle.internal.Either$Left.fold(Either.java:115)
        at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:59)
        at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:68)
        at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:46)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:36)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:25)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:91)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:55)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:37)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:65)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:36)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:76)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:37)
        at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:94)
        at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:49)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:71)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:45)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.executeWithNonEmptySources(SkipEmptyWorkStep.java:177)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:86)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:53)
        at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:32)
        at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:21)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
        at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:36)
        at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:23)
        at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:75)
        at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:41)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:32)
        at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:287)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:21)
        at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
        at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
        at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:47)
        at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:34)
        at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:64)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:146)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:135)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:337)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:324)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:317)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49)

And if I look via html report. Here is one stacktrace for one failing test

java.lang.ExceptionInInitializerError
    at jdk.internal.reflect.GeneratedSerializationConstructorAccessor14.newInstance(Unknown Source)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
    at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.newInstance(SunReflectionFactoryInstantiator.java:48)
    at org.objenesis.ObjenesisBase.newInstance(ObjenesisBase.java:73)
    at org.mockito.internal.creation.instance.ObjenesisInstantiator.newInstance(ObjenesisInstantiator.java:21)
    at org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.createMock(InlineByteBuddyMockMaker.java:235)
    at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:35)
    at org.mockito.internal.MockitoCore.mock(MockitoCore.java:69)
    at org.mockito.Mockito.mock(Mockito.java:1933)
    at org.mockito.Mockito.mock(Mockito.java:1844)
    at com.privatebanking.app.DeviceDetailsTest.<init>(DeviceDetailsTest.java:36)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
    at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:250)
    at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:260)
    at org.junit.runners.BlockJUnit4ClassRunner$2.runReflectiveCall(BlockJUnit4ClassRunner.java:309)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:306)
    at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
    at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
    at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
    at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
    at org.mockito.internal.runners.DefaultInternalRunner$1.run(DefaultInternalRunner.java:99)
    at org.mockito.internal.runners.DefaultInternalRunner.run(DefaultInternalRunner.java:105)
    at org.mockito.junit.MockitoJUnitRunner.run(MockitoJUnitRunner.java:163)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:108)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:40)
    at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:60)
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:52)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
    at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
    at jdk.proxy1/jdk.proxy1.$Proxy2.processTestClass(Unknown Source)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:176)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
    at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
    at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
    at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
    at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
    at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by: java.lang.NullPointerException: Cannot load from int array because "__$coverage_local$__" is null
    at com.privatebanking.app.PrivateBankingApplication$Companion.<init>(PrivateBankingApplication.kt:37)
    at com.privatebanking.app.PrivateBankingApplication$Companion.<init>(PrivateBankingApplication.kt)
    at com.privatebanking.app.PrivateBankingApplication.<clinit>(PrivateBankingApplication.kt)
    ... 59 more
shanshin commented 6 months ago

Replace runtimeOnly(libs.kover.offline.runtime) with the implemetation(libs.kover.offline.runtime). Runtime's classes should be included in the application

MedetZhakupov commented 6 months ago

Actually above stacktrace is for when I used implemetation(libs.kover.offline.runtime). Getting same error

shanshin commented 6 months ago

It may be worth completely rebuild the application, but this error usually indicates that runtime classes are unavailable

MedetZhakupov commented 6 months ago

Does it mean I must first run assemble task and then test task?

shanshin commented 6 months ago

Call clean Gradle task before test runs

MedetZhakupov commented 6 months ago

I have always been running test as below: ./gradlew clean app:testBelgiumDevDebugUnitTest

Interestingly if I comment out below script tests succeed

tasks.withType(KotlinCompile).configureEach {
    doLast {
        def outputDir = destinationDirectory.get().asFile
        def koverJar = koverCliJar()
        if (koverJar) {
            println "Kover Offline Runtime Execution starting"
            def args = []

                args << "java"
                args << "-jar"
                args << koverJar.canonicalPath
                args << "instrument"
                args << outputDir
                args << "--dest"
                args << outputDir

                def changedFiles = changedFiles()
                changedFiles.forEach { file ->
                    args << "--include"
                    args << file
                }
            exec { commandLine(args) }
            println "Kover Offline Runtime Execution finished"
        } else {
            println "Kover CLI JAR not found in dependencies"
        }
    }
}
MedetZhakupov commented 6 months ago

One question. above script is expected to run after compilation finished or after unit test gradle task completion?

shanshin commented 6 months ago

Interestingly if I comment out below script tests succeed

In this case, the instrumentation will not occur and the .ic file will not be created.

One question. above script is expected to run after compilation finished or after unit test gradle task completion?

the test task depends on the compilation task. Therefore, compilation task will be called before running the tests, instrumentation will occur, and only after that the tests will be performed.

However, it is not necessary to instrument the tasks of compiling tests.

MedetZhakupov commented 6 months ago

However, it is not necessary to instrument the tasks of compiling tests.

Does it mean that I do not have to instrument actually but just run tests and after that run KoverCli report? Because I can see *.ic files being generated after running unit tests anyway for the app and each module configured with kover. For instance as below image

image
shanshin commented 6 months ago

Does it mean that I do not have to instrument actually but just run tests and after that run KoverCli report? Because I can see *.ic files being generated after running unit tests anyway for the app and each module configured with kover. For instance as below image

not really, you only need to instrument tasks for only compiling application classes, not compiling tests (in your case, it will be, for example, compileBelgiumDevDebugKotlin)

Because I can see *.ic files being generated after running unit tests anyway for the app and each module configured with kover. For instance as below image

It is not recommended to use the Kover Gradle Plugin and the offline instrumentation at the same time - this can lead to unexpected errors. Offline instrumentation is used when the Kover Gradle Plugin is not applicable.

MedetZhakupov commented 6 months ago

It is not recommended to use the Kover Gradle Plugin and the offline instrumentation at the same time - this can lead to unexpected errors. Offline instrumentation is used when the Kover Gradle Plugin is not applicable.

This is new info to me. Indeed we're using Kover Gradle Plugin in combination with SonarQube to track projects code coverage. What I am trying to accomplish on top it is to have code coverage report only for changed files, which I get from git commit, and fail pipeline for Pull Request if coverage is below certain percentage, for instance 50%, but only for changed/added kotlin files not for entire project. I know that Kover Gradle Plugin minium coverage feature in place but checks for entire project coverage but I need is only for changed files. Could you give any advice on how I could do that? Is it even possible with Kover?

shanshin commented 6 months ago

Could you clarify what is the the number of modified files in your PR? Tens, hundreds or thousands?

MedetZhakupov commented 6 months ago

Normally it's between a range of 10 to 20 files. It's rare when we have 100 files affected in a single PR. Those things happen during big migrations only.

MedetZhakupov commented 6 months ago

But it is also not about an entire file which has changed but rather to focus only on change within that file.

MedetZhakupov commented 6 months ago

@shanshin any advice on how I can accomplish above or is it simply not possible?

shanshin commented 6 months ago

It looks like even if you set up offline instrumentation correctly, you will not be able to collect coverage in this way: in

tasks.withType(KotlinCompile).configureEach {
    doLast {
        def outputDir = destinationDirectory.get().asFile
        def cliConfig = configurations.named("koverCli")
        def koverJar = cliConfig.get().filter { it.name.startsWith("kover-cli") }.singleFile

        exec {
            commandLine(
                    "java",
                    "-jar",
                    koverJar.canonicalPath,
                    "instrument",
                    outputDir,
                    "--dest",
                    outputDir,
                    "--include",
                    changedFiles()
            )
        }
    }

you use file names in it, however, only class names are accepted as input of parameter --include (which are written differently and do not always match the name of the containing file).


Also, it seems to me that using the approach of displaying coverage of only modified files is an ineffective means of controlling coverage. Let's consider two cases:

Let's say in PR you change only class B

class B {
    fun foo() {
        println("call foo")
    }
}

according to the modified files report, the percentage of coverage remained unchanged, but in reality, coverage has dropped significantly (for class A, coverage is now 0%)

Therefore, I would recommend avoiding using the modified files report to analyze coverage changes.

To do this, you may use other metrics: for example, compare the percentage of coverage of all classes before and after changes, and issue a warning if the newer class coverage has become less than a certain value, or if the coverage has decreased by a certain value

MedetZhakupov commented 6 months ago

To do this, you may use other metrics: for example, compare the percentage of coverage of all classes before and after changes, and issue a warning if the newer class coverage has become less than a certain value, or if the coverage has decreased by a certain value

@shanshin thanks a lot for the detailed explanation and guidance. Would you give high level advice on how I could approach in terms of implementation your suggestion above? How do I get coverage of all classes before the changes? Should I checkout to master and run koverXmlReport and checkout back to PR branch? I cannot imagen how I can do this

shanshin commented 6 months ago

Unfortunately, there is no universal solution here. It all depends on your workflow, CI/CD settings etc. This does not directly apply to Kover, so we cannot directly describe how to use it.

However, in general terms, yes, you first need to run koverXmlReport on the main branch, save the XML report somewhere, then generate a new XML report for changes from PR and compare its contents with the contents in the main branch.

You can try using external tools, such as codecov, which have such functionality. However, there are some problems with codecov integration.

shanshin commented 4 months ago

Closed as answered. Feel free to create new issue if you have any additional questions.