Benchmarks: Abstract test base

Add common test code to abstract test base.