Does one need to test independence of variables first? Suppose one is given the following data set $X$.
"8  5 12  4 11  6  8  7  7 12  7  3 11 14 11  9  6  6  5 6 10 14  4  5  5" Let $n$ be number of data points.
One wants to obtain 95% confidence interval of mean of $X$. Let $\mu$ be the estimated mean and $\sigma$ be estimated standard error. This requires usage of t-distribution. One of the fundamental assumption of this should be mean estimator and variance estimator independence.
How should one test upon mean estimator and variance estimator independence over above data set? There is only one realization for mean and variance.
 A: You don't need to test the independence, because the t-test is relatively robust to that assumption, especially when the data are expected to be generated from a nearly uniform distribution.  But it is of interest to contemplate such a test, especially one that might reveal the nature and degree of interdependence between the sample mean and standard error (SE).  Thus, I propose exploring the situation rather than applying some formal hypothesis test.
A simple bootstrap procedure repeatedly obtains samples (with replacement) from the data you have (using samples of the same size as your data) and studies how the subsample mean and SE might be related.  To the extent your data are representative of a parent data-generation process, this bootstrap dataset is likely to reflect how your actual sample behaves.
To illustrate, here is a scatterplot of the means and SEs of five thousand bootstrapped samples.

It looks like the mean and SE are positively related (in a curvilinear fashion). But the SE doesn't change a whole lot throughout this range of possibilities (it increases by less than 50%), suggesting the dependence might not affect the confidence interval much.
As a reference, I generated a dataset of the same size from a Normal distribution (of the same mean and variance as your data) and repeated this process:

Although there is some curvilinearity, it is slight and is consistent with the variance not depending on the mean.  In contrast to the figure, this reinforces the initial inference that there is lack of independence for your data.
Finally, as an example of something that would cause one to worry about applying a $t$ test, here is a plot for exponentially distributed data.

Now there is a substantial variation of SE with mean(by a factor of three or so).

The right question, though, is "so what?"  You can bootstrap the t-statistics for your data to study that.  But experience shows that in your case that isn't needed: a t-test will work fine, needing no preliminary tests of independence (or normality).

The following R code produced the first scatterplot and a variant produced the second.  It shows how simple such a study is to perform.
x <- c(8,5,12,4,11,6,8,7,7,12,7,3,11,14,11,9,6,6,5,6,10,14,4,5,5)
# set.seed(17)
# x <- rnorm(length(x), mean(x), sd(x)) # Normal data example
# x <- rexp(length(x)*10, 1/mean(x))    # Exponential data example
#
# Bootstrap `x`.
#
f <- function(x) c(mean(x), sd(x)/sqrt(length(x)))
sim <- replicate(5e3, f(sample(x, replace=TRUE)))
#
# Plot the results.
#
plot(t(sim), col="#00000020", ylim=c(0, max(sim[2,])), # Make sure to show height zero
     main=paste(dim(sim)[2], "Bootstrap Statistics of the Data"), 
     xlab="Mean", ylab="S.E.")
fit <- lowess(sim[1,], sim[2,])
lines(fit$x, fit$y, lwd=2, col="Red")

