How to use Serializable instruction?

Hi, i would like to know how to do for insert in the Inspector View the variable of a my custom Class. Like i did gives me an error in the script.
This is my base script:

using UnityEngine;
using System.Collections;


[System.Serializable]
class test
{
	public int num = 5;
	public Color colVar = Color.white;
}


public class Spawing : MonoBehaviour {
	
	public test testVar;
	

	// Use this for initialization
	void Start () {
		
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	

}

Your test class need to be public