This is an important update from Salesforce in Spring 2015 release.
Rather than re-phrasing the same theory again, I am just sharing an article explaining this awesome annotation @testSetup to be used for Test Classes.
The below link has everything needed to know as a part of this feature.