Gastric emptying is a test that measures the time it takes for food to empty from the stomach and enter the small intestine. The test often is used to find out why your child is vomiting, having stomach pain or not gaining weight. The test can be done as an inpatient or outpatient.