Added database queries to test pages for more accurate test results.