function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tapas TuloTapas Tulo 

Superbadge Security Specialist Step 2 :Test Method Fails

Hi All,
 Am not able to make my status Successful when run my Test Method...
PFB my screenShot
IUser-added image
Thanks & Regards,
Tapas
Thiruchuri AdityanThiruchuri Adityan
What is the error you are getting after you click on that particular row ?
Tapas TuloTapas Tulo
HI Thiruchuri,
  
    PFB ScreenShot.
User-added image
 
Thiruchuri AdityanThiruchuri Adityan
Can you share the code of both main apex class and its test class ??
Tapas TuloTapas Tulo
HI Thiruchuri,

 Thank you For Your quick Response.
FYI
 i have not written any apex class/Test class.i just installed it from managed package.

When i hit the check Challange button on trailhead i got the below Error:-
Challenge Not yet complete... here's what's wrong: 
The unit tests in the managed package have not passed successfully. Make sure you run all test in your org before checking this section. Ensure that they all pass.


Thank you!!
Thiruchuri AdityanThiruchuri Adityan
In that screen click on select tests button and choose all the classes.  And before doing this compile all the classes.  This might help you.
Tapas TuloTapas Tulo
HI Thiruchuri,
   
 in the class nothing is there, when i was trying to compile i saw (hidden) in the code area.
 i don't have any idea.it would be great if you will help me out.
 PFB ScreenShot
User-added image
Thank you!!
 
Thiruchuri AdityanThiruchuri Adityan
From a managed package you cant access the code. . .
Follow the steps.

1. in the Quick find box type apex classes
2. Then Chose "All" in the picklist for view "View"
3. Now click on Compile all classes which is above the picklist.
4. Once compilation is complete then type "Apex Test Execution" in the Quick Find Box
5. Now click on Select Tests button and choose all the classes.
6. Let me know if this helps you.
Tapas TuloTapas Tulo
Hi Thiruchuri ,
 
 I saw some strange thing in that installed package,
it does not contain any apex class inside, its completely blank :(

Thanks!!
Thiruchuri AdityanThiruchuri Adityan
As it is a managed package, you cannot see code inside it.. It will appear as blank only..
Frankie CollyerFrankie Collyer
Hi Thiruchuri, 
I have the same problem as Tapas, I tried your recommendation from 1/30/17, and it did not work. 
 
Viviana AlbarracinViviana Albarracin
User-added image
Ann Manza-Geerts 4Ann Manza-Geerts 4
I switched to Classic to run the Apex tests and that worked for me.
Matteo RoccoMatteo Rocco
Hi all,

I have the same problema as Tapas and I still can't get it pass... I tried to uninstall the managed package and re-install both for "admins only" and "all users", however the outcome is always a failure in testing. Also tried to switch to Classic as suggested above, but still nothing...

Any help please? I'm loosing night sleep because of it..! :( 

Thanks,
Matteo
Bartosz Dyczkowski 9Bartosz Dyczkowski 9

@Thiruchuri Adityan  - thanks! 

Matteo - this solution by Adityan works: 

"From a managed package you cant access the code. . .
Follow the steps.

1. in the Quick find box type apex classes
2. Then Chose "All" in the picklist for view "View"
3. Now click on Compile all classes which is above the picklist.
4. Once compilation is complete then type "Apex Test Execution" in the Quick Find Box
5. Now click on Select Tests button and choose all the classes.
6. Let me know if this helps you."

hari prasad 197hari prasad 197
Hi All,
i get a an error 
Challenge Not yet complete... here's what's wrong:
The unit tests in the managed package have not passed successfully. Make sure you run all test in your org before checking this section. Ensure that they all pass.
When i run the Apex class test the following error occurs.
Can some one suggest Plz....


Error in Apex class
Pratiksha ChauhanPratiksha Chauhan
I was also facing the issue to pass this challenge due to test class failed , in my case it was the spelling error of role Sales Executive , i wrote it Sales Executives and after correction it worked for me. Please make sure about the spellings before passing this challenge. I hope it would help.
 
Payal Saxena 22Payal Saxena 22
Hi,

I still not able to pass this challenge, I found classes but my apex test execution is failed.

Apex-test execution is failed in Security Specialist superbadge step 2