Skip to main content Join us at TDX in San Francisco or on Salesforce+ on March 5-6 for the Developer Conference for the AI Agent Era. Register now.

I am trying to complete my Winter 25 Platform Developer I maintenance, and keep getting the following error when trying to complete the Challenge.

"Challenge not yet complete in Brave Moose Playground

We can’t find The Annotation @IsTest for method ‘testIterableForLoop’. "

 

I have tried to correct this multiple times by creating a new playground, but the same error persists.  As you can see below the @IsTest annotation is in my code below:

@IsTest

public class MyIterableTest {

@IsTest

    public static void testIterableForLoop () {

        List <String> strings = new List<String> {'Hello', 'World'};      

            MyIterable myIterable = new MyIterable(strings);

        for (String str: myIterable)

        {

            System.debug(str);

        }  

    }

}

 

Any help and Insight would be appreciated

16 answers
  1. Dec 23, 2024, 4:09 PM

    Working with Support, they were able to resolve the issue.  If you get this issue, I suggest opening a salesforce case, as I had to create a user for them in order for it to be resolved.  

  2. Dec 31, 2024, 6:52 PM

    If you came across this post and still had this issue, I found their evaluation process was case-sensitive.

    When I had the annotation set as "@isTest" I would get the error, when I changed it to "@IsTest" then the evaluation passed.   Note that the test would actually execute either way, but something about the parser required the case sensitivity.

  3. Dec 27, 2024, 7:51 AM

    Please declare the method like this. Also added Test.startTest() and Test.stopTest();

    @IsTest private static void testIterableForLoop() {

    }

  4. Jan 15, 1:49 PM

    Hi All,

     

    I am facing this error even after applying above solutions:

     

    testIterableForLoop failed(), check Error message for more details.

  5. Jan 3, 6:30 AM

    Agentforce provided valuable assistance in identifying the issue.

    Here’s what worked for me:

    @isTest

    public class MyIterableTest {

       

        @isTest private static void testIterableForLoop(){

            List<String> strings = new List<String>{'Hello', 'World'};

     

     @isTest -> @IsTest

            

    The issue was resolved by correcting the annotation from @isTest to @IsTest (with a capital "I"). Once I made this change, the test ran successfully. 

     

    Thanks to the insights from Agentforce and others in this thread for pointing it out. I hope this helps anyone encountering a similar issue. Sharing this solution to save others the debugging time!

  6. Jan 8, 8:37 PM

    All looks good to me:All looks good to me:But still getting:Challenge not yet complete in Maintenance Win25We can’t find the list of string with value ‘Hello’,’World’.But still getting:

    Challenge not yet complete in Maintenance Win25

    We can’t find the list of string with value ‘Hello’,’World’.

  7. Jan 4, 4:57 PM

    I had the same issue.

    It turns out that the method name should be exactly the same as what's on the exercise (seems like the checker is case sensitive). If you use IsTest annotation on the class, use IsTest annotation on the test method as well (consistency is the key).

0/9000