How to pass a method name as test name on LambdaTest dashboard dynamically?

How can I dynamically pass a method name as a test name on the LambdaTest dashboard?

Hey Matthew,

The following method can be placed inside each method to set the respective method name as test name :

String nameofCurrMethod = new Throwable()
        .getStackTrace()[0]
        .getMethodName();
System.out.println(nameofCurrMethod);
((JavascriptExecutor) driver).executeScript("lambda-name="+nameofCurrMethod);