I tried all possible solution still facing below error and need to complete it by 5th december 2025. Please help me on this. Error : Challenge not yet complete. We can't find the last successful test run that invokes the testIterableForLoop method. Run the test again and check the test run results for more details.
=================================================
My Code: MyIterable.apxc - public class MyIterable implements Iterable<String> { private List<String> strings; public MyIterable(List<String> strings){ this.strings = strings; } public Iterator<String> iterator(){ return strings.iterator(); } } MyIterableTest .apxc @IsTest public class MyIterableTest { @IsTest public static void testIterableForLoop(){ List<String> strings = new List<String> {'Hello', 'World'}; MyIterable myIterable = new MyIterable(strings); // Test.startTest(); for(String str: myIterable) { System.debug(str); } //Test.stopTest(); } }
Thank you everyone for your attention.
I found solution by running test class from setup.
Setup > Apex Test Execution > select your class > Run > Validate your challenge