I have created a outbound changeset from test to production. After uploading to production i validated the package in production. It failed for one test class. I tried running that test class individually in test and production and it passed but when i run it in package it is failing.

  • Can you share test class and error which you are facing?
    – Peeyush
    Commented Feb 17, 2016 at 9:43
  • Your validations are returning null from the saveRfp() method.
    – ajinkyah
    Commented Feb 17, 2016 at 9:50
  • What happens if you run all of the same tests in your sandbox as a group? Do you get the same error?
    – smckitrick
    Commented Feb 17, 2016 at 13:39

2 Answers 2


This can have multiple causes. If the test class runs fine at the moment, but not if you include your other changed resources, these other resources are doing something that effects the outcome of this test class. For example, if you assert for a deactivated User, but one of the other modified classes or triggers prevents a user from being deactivated, your test class will now fail.

To further investigate this, please provide some example code.

  • I have updated the above Commented Feb 17, 2016 at 9:48

Null value returned from the method saveRfp() and your test method set the null value as current page which causes the issue.

when you call the method saveRfp() from your test class, the two validation methods isFormValid() and saveData() should get passed.

If error received only during deployment,please check if any errors when you run all test classes in sandbox.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .