Tech IndustryJul 23, 2019
Fanaticsheroforfun

Salesforce interview

I got a hackerrank question to simulate system dependencies. my solution was correct but the unit tests failed cause I was using static variables and so it caused data to be retained between tests which caused wrong data for tests. I thought it would be ok if code was reviewed but it still didn't get me to the next round. Anyone know what other criteria to look at?

NVIDIA bdei51 Jul 23, 2019

Whether you know what static variable is

Google blurbles Jul 23, 2019

I worked at Salesforce for a few years, but hacker rank didn’t get heavy use until just after I left. Static state in tests is a huge problem there and regularly causes devs pain. As a reviewer I would be wary of someone who submitted code with that particular issue. That being said, it’s possible that they just use the test cases as a filter and you are required to pass all the tests to go onsite.

Fanatics heroforfun OP Jul 23, 2019

I was reading somewhere that other people who got this same question had test cases fail too but still got called on site so no idea why

SAP FqeV64 Jul 27, 2019

Hi can you share your question details?