You need to sign in to do that
Don't have an account?
Jordan Vasquez
SOQL Query fails in Apex Test during deployment but passes when manually run?
Hello everyone,
All of a sudden I have been experiencing an issue with one of my apex test classes, mainly for a single line of code. This test class has been working for months but all of a sudden has prevented me from pushing anything into my Production org. Furthermore, it is failing on a SOQL query that I know should pass. I can make this same exact query in workbench and get results. Running the same test manually in my Production Org passes. Running all tests in my Production Org at once and everything passes.
I am at a loss for what is happening and any guidance is greatly appreciated, thanks.
All of a sudden I have been experiencing an issue with one of my apex test classes, mainly for a single line of code. This test class has been working for months but all of a sudden has prevented me from pushing anything into my Production org. Furthermore, it is failing on a SOQL query that I know should pass. I can make this same exact query in workbench and get results. Running the same test manually in my Production Org passes. Running all tests in my Production Org at once and everything passes.
I am at a loss for what is happening and any guidance is greatly appreciated, thanks.
This passes in my test case when run manually but fails when I attempt to deploy anything, even a simple comment update in my test case!
Please check once in your deployment org is having record type(System) or not.
AssetRC = [select id,name from recordtype where sobjecttype = 'Asset' and name = 'System'];
If not create or deploy the first record type then Deploy your code.
Hope this helps you!
Thanks
Varaprasad
@For Support: varaprasad4sfdc@gmail.com