To extend what PGStats said, the test you perform depends on what you know (and want to know) about the data.
1. Where dd the data come from? If there reason to think that the data generating mechanism is uniform?
2. Do you know the upper and lower bounds of the data? For example, is the data always in the interval [0,10]?
3. Your example uses integer values. The Beta distribution is a continuous distribution. You can use the Beta distribution to test whether continuous data fits a uniform distribution. Unless your real data has values like 2.72 and 6.135, you won't get a good fit with the Beta distrib.
4. Based on your sample data, I think KSharp has the right idea. If you have lots of data that has integer values, you can test for a discrete uniform distribution on the set {0,1,...,10} by using a chi-square test. If you have only a small amount of data (like your example), you probably want to bin groups together. For example, run a chi-square test for frequencies in the set {0-1, 2-3, 4-5,...}
... View more