[SalesForce] Trailhead Apex Specialist Super Badge test class error

I am trying to complete the challenge number#5 on the Advanced Apex Specialist Super badge and I am stuck with an error. I am getting an error stating that the test method doesn't have proper declaration or access modifier but the test method does have all of that. Not sure how to proceed here.

Error Message:
enter image description here

Test class signature that I have tried with and all have resulted in the same error:

Option1

@isTest static void OrderUpdate_UnitTest() { ... }

Option2

@isTest private static void OrderUpdate_UnitTest() { ... }

Option3

@isTest(seeAllData=false) private static void OrderUpdate_UnitTest() { ... }

Option4

static testMethod void OrderUpdate_UnitTest() { ... }

Option5

private static testMethod void OrderUpdate_UnitTest() { ... }

EDIT

TestDataFactory.VerifyQuantityOrdered

public static void VerifyQuantityOrdered(Product2 originalProduct, Product2 updatedProduct, Integer qtyOrdered) {
       system.assert(updatedProduct.Quantity_Ordered__c == originalProduct.Quantity_Ordered__c+qtyOrdered);
    }

Best Answer

Have you tried making the Test Class public or the methods themselves public or global?

Not sure how they verify these tests, but assume its a mixture of Metadata API and actually running the tests themselves, and could be the latter not being possible if they are all private. If you have already had tests validated by Trailhead in earlier challenge steps without having to use public though, this answer is probably on the wrong track.

Related Topic