Gradle Android: How to Display test results without using --info

前端 未结 3 1090
梦谈多话
梦谈多话 2021-02-15 12:59

I am running android tests using the Gradle Android plugin and want to see individual test results.

From answers to this Question Gradle: How to Display Test Results in

3条回答
  •  别那么骄傲
    2021-02-15 13:09

    For me all the options mentioned in the other answer still printed a lot of verbose information. So despite the requirement that info should not be used, I successfully use the following. For example, if your tests are in the package com.example.android, you can use:

    gradle --info connectedDebugAndroidTest | grep "com\.example\.android\..* >"
    

    Will print e. g.:

     com.example.android.login.LoginActivityTest > enterCredentialsTest[Testing_emulator(AVD) - 9] SUCCESS
    

    And the word "SUCCESS" will be green, which is awesome.

提交回复
热议问题