Sample Test Class:
@isTest
public class HelloworldTest {
@isTest
public static void testHelloworld() {
}
}
1. Check whether @isTest annotation is used in the Class.
2. Author Apex and View Setup and Configuration permissions in the Profile.