You need to sign in to do that
Don't have an account?
Gunnar
Unit Tests Broke: Variable does not exist: name
Unit tests that have been in existence for some time, and pass, broke.
Created a new developer sandbox from our Production.
Ran all tests in the new sandbox.
A LOT of code is breaking.
The unit tests create their own data as such ...
// Create Account
Account a01 = new Account();
a01.name = 'Guess Things Happen That Way';
a01.ownerid = JohnnyCash.id;
When it hits this line "a01.name = 'Guess Things Happen That Way';"
It breaks, saying "Compile Error: Variable does not exist: name at line 31"
Again, this has been working for a LONG time, it's in a unit test.
Created a new developer sandbox from our Production.
Ran all tests in the new sandbox.
A LOT of code is breaking.
The unit tests create their own data as such ...
// Create Account
Account a01 = new Account();
a01.name = 'Guess Things Happen That Way';
a01.ownerid = JohnnyCash.id;
When it hits this line "a01.name = 'Guess Things Happen That Way';"
It breaks, saying "Compile Error: Variable does not exist: name at line 31"
Again, this has been working for a LONG time, it's in a unit test.
However, you would think it fails in production too, where the sandbox comes from.
This was a brand new sandbox.
I dropped the instance of the sandbox.
Then re-created the sandbox.
Problem went away.
I've seen this before - where a brand new sandbox has an issue.
I always run all unit tests on a new sandbox. This is why.
Thanks.
All Answers
However, you would think it fails in production too, where the sandbox comes from.
This was a brand new sandbox.
I dropped the instance of the sandbox.
Then re-created the sandbox.
Problem went away.
I've seen this before - where a brand new sandbox has an issue.
I always run all unit tests on a new sandbox. This is why.
Thanks.