'replace ClassName with custom string to display in IntelliJ scalatest window

For a specific use case, we are trying to replace

ClassName with Verifying ClassName

in IntelliJ scala test case window.

For that, we overridden toString method in spec class as below :-

override def toString: String = s"Verifying ${getClass.getSimpleName}"

Still in IntelliJ test class, we can see only test ClassName name.

Kindly suggest, how to implement it.

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source