I am searching for a suitable outlier test to find potential outliers in a relatively small sample (5-10 measurements). I assume that the data are normally distributed, 1-dimensional and I am looking for a test that can find multiple outliers. I do not know in advance how many outliers there may be. Does anyone of you have experience in this area and can recommend me one or more tests that meet the upper requirements?
My goal is to program an algorithm which finds outliers automatically when inputting the data and removes them.
Outlier ID is often done in terms of outliers in boxplots, but making a boxplot from as few as 10 observations is not always informative. (Roughly speaking, half of the data gets used up making the boundaries of the box and whiskers.) As stated in my Comment, it is usually a mistake to remove suspected 'outliers' without very good reason.
Ordinarily, with data randomly sampled from a normal distribution, it would be difficult to know how to remove several observations in a sample of size 10 as being outliers, just by looking at the small sample. If you are working for a company that has experience about kinds of observations that are not useful, then you might use that information 'external to to the sample' to comply with company standards.
It is important to realize that some kinds of populations routinely produce samples with boxplot outliers. Even samples of moderate size from normal populations routinely show boxplot outliers.
Specifically, the following simulation shows that over $1/3$ of normal samples of size 50 produce at least one outlier and that overall there are on average about 0.58 outliers per sample.
Here are boxplots of 25 samples of size 50 from a standard normal distribution, in which dots indicate outliers. Eleven of these samples happen to have outliers.
Here are boxplots of 25 normal samples of size 10.