How to get a random floating number

I was looking to generate a random floating number in a test case step, so that i get get a new random number in every run. my script needs a unique floating number (ex 1.01) for each run.

You could try with this:

DecimalFormat df = new DecimalFormat();
df.setMaximumFractionDigits(2);//// Or you can also use: DecimalFormat df = new DecimalFormat("#.##") instead
Random random = new Random()
//Input Min and Max range for your random range
double rangeMin = 1.0f;
double rangeMax = 7.0f;
float_1 = df.format(random.nextDouble() * (rangeMax-rangeMin) +rangeMin)
println ("Random Float: " + float_1);