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
Beth HowardBeth Howard 

Security Specialist Superbadge - managed package didn't come with any Apex tests

I downloaded it this afternoon (6/25, around 2.30p Pacific time), before I knew what it was for. I've got to Step 2 in the challenge, created the user and opportunitites, but I can't run the tests because . . . there were no tests in the package.

For reference, here's a screenshot of the package components. Am I missing something?
screenshot - security specialist superbadge package, list of components
Best Answer chosen by Beth Howard
Beth HowardBeth Howard
Aha, I did miss something . . . the test class does not have "test" in the name like I was expecting  *facepalm*

All Answers

Beth HowardBeth Howard
Update: I tried checking the challenge anyway and got the following error message:
error message: apex tests don't pass
Beth HowardBeth Howard
Aha, I did miss something . . . the test class does not have "test" in the name like I was expecting  *facepalm*
This was selected as the best answer
James LoghryJames Loghry
Hi Beth, not sure if you've figured this out yet or not (I just had the same error and found a resolution).  If you go to your unit test history and look at the error, it'll likely explain that you're not sharing the Opportunities correctly.  The solution is to edit (or add) an owner based Opportunity sharing rule that shares all Opportunities that are owned by "Roles and Role Subordinates" of the "Sales Exec" role  with the "Inside Sales" role.

Once this sharing rule is corrected, then try running the unit test again first.  If it passes, then re-check the challenge.

Hat Tip to this thread for helping me figure out the issue: https://developer.salesforce.com/forums/?id=906F0000000kEGAIA2
Beth HowardBeth Howard
Thanks, James - I did get it eventually.
Derek Bennett 5Derek Bennett 5
Can anyone help me figure this out:

I am stuck on superbadge challenge #2. Origianlly the error i kept receiving said that my opportunity sharing rules were not correct, and now that I've gotten those correct I still cannot pass the challenge.
Heres the error I cant seem to get pass on trailhead:

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.

On the developer console I get this error message:
System.QueryException: List has no rows for assignment to SObject


How do I troubleshot this? or what am I doing wrong? 

1. opportunities are set to private
2. public group has been created (project managers) carla rodriguiz 
3. sharing rules are correct and match that of others who have passed
4. two opportunity records are created for samantha, one with stage closed won, next with type existing customer-upgrade
5. I am using a newly created org, and have uninstalled and reinstalled the package multiple times
6. I even logged in as samantha and created the two opportunities

What do I need to do for the test to pass sucessfully? 


 
Krasi IvanovKrasi Ivanov
Hi, I am having absolutely the same issue as Derek. Any solutions? 
Esteban RuizEsteban Ruiz
Hi, I am having absolutely the same issue as Derek. Any solutions? 
Mourad, El FetaouiMourad, El Fetaoui
Hi, My problem is I did not find the class Beawesome in the namespace list, is there any package I have to install ?Namespace list
Sia Thripio 1343Sia Thripio 1343
@Mourad - did you figure this out? I have the same issue.
Daryl Dominic ApostolDaryl Dominic Apostol
I just solved this. To those who CAN'T FIND THE Beawsome namespace, it is because you installed it in a different PLAYGROUND.

yes, I also copied the link pasted it and installed it only to find out it was installed in my very first playground.

WITH THIS LINK===
package: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t36000000jWht

JUST COPY: /packaging/installPackage.apexp?p0=04t36000000jWht

AND PASTE IT TO YOUR CURRENT URL OR PLAYGROUND SUCH AS

https://playful-wolf-lcfc88-dev-ed.lightning.force.com/lightning/setup/ImportedPackage/page?address=%2F0A3&0.source=aloha

So the final URL WOULD BE:

https://playful-wolf-lcfc88-dev-ed.lightning.force.com/packaging/installPackage.apexp?p0=04t36000000jWht

something like that.

User-added image

now I passed it.