+ Start a Discussion
Tristan Rhodes 6Tristan Rhodes 6 

Security Specialist Superbadge Apex Text Execution errors in Step 2

Hi All,
I've passed step one, and i'm a tad stuck on step 2 as the Apex test execution (BeAwesome) test methods both fail:
User-added image
It does not explain why these failed (as far as I an see) and I cannot seem to find any reason why. Is this a poblem with the test, or is it that I've got something wrong?
I've created the 2 extra contact fields (encrypted text), and I've obviously passed step 1, so I'm quite certain the object sharing, profiles and org-wide rules are set up correctly.
Not really looking for guidance on the answer here, I just don't understand how the Apex tests work, what their function is and the reason for the failures.
Thanks in advance.....
Amit Chaudhary 8Amit Chaudhary 8
Tristan Rhodes 6Tristan Rhodes 6
Hi Amit,

Thanks for for your response. I checked the first post you linked to, and the only difference was that the role names were not identical (I had the word ‘user’ after each role). I deleted the word ‘user’ and now the Apex Test passes 1 out of 2. So progress has been made.
But everything else was already identical to the screenshots in Tim Calje’s post of July 11th, 2016.
so now I wonder if the role radio buttons are set correctly.
this is how I have them set up:
User-added image
User-added image
User-added image
I did also have criteria based sharing rules set for accounts, but I’ve deleted those for now.
Tristan Rhodes 6Tristan Rhodes 6
Turns out I needed the account cirteria rule. Oddly, it only passed once the other issue was resolved. Added back in now both APEX tests pass:
User-added image