Generation of random stress tensors