add rw_test method
Add main logic of the test driver