I am using XML file in Static resources for unit testing. The controller class method validates the contents of XML file.I am passing XMLbody to method as string. When I ran the tests, the coverage is now 75%.
I have two questions
- Since I am using static resource file for testing, Shouldn't I include this file for migration to sandbox?
- I have hard coded data in XML file. For example, Authorization ID. This ID exists in database. XML file should have data for this authorization ID. When we move this file to other sandbox for testing, it may not work since authorization ID may not exist.This Authorization ID has been created from page functionality. So what is the methodology here to generate test Authorization ID and use it in XML so that it will not break testing in other sandbox.
Thank you very much