Derivation of the equation

The probability that one test will fail is by definition f. That two independent tests will both not fail is (1-f)(1-f). That N tests will find no failures the probability is an N-fold product of (1-f). Therefore, the probability that this outcome will not be observed, which is the definition of the upper confidence bound, is 1 - (1-f)^N.