First way is to use the Assertions in your script for validating the output data. In your case I will suggest you to use the Response Assertion and pass the matching criteria from a CSV file, using 'CSV Data Set Config' configuration element.
For example, you will mention ${firstName}
in the response assertion, and the CSV file should be containing the values of FirstName for all 100 employees (this list you can get from the Database and save it as a CSV file), but this list should be in same sequence as the list which is there in your input CSV file. So you will have 2 CSV files.
- CSV 1 : for feeding your script for 100 users
- CSV 2 : Firstname of users which is the list of Expected result
Now variable in the response assertion will pick value from the 'CSV 2' file and compare it with the actual result which will be there in the response of the execution (as you have shown). If both matches (Actual Result same as Expected Result) then Assertion is Pass, else Fail.
In similar way you can apply assertion to 'Lastname', 'Date of Birth' etc.
https://blazemeter.com/blog/how-use-jmeter-assertions-3-easy-steps
http://examples.javacodegeeks.com/enterprise-java/apache-jmeter/jmeter-response-assertion-example/
Second way will be to extract the values from the response of your script result using a Regular Expression Extractor and then saving it one by one in a file. Then you can pick that file and compare it with you expected result. For this you will need to use:
- Regular Expression Extractor for extracting the data
- Beanshell post processor for saving the data in a text file
You will need to use the below mentioned code
// Empfirstname = FirstName of the employee extracted using the Regular Expression Extractor
firstname = vars.get("Empfirstname");
// Emplastname = LastName of the employee extracted using the Regular Expression Extractor
lastname = vars.get("Emplastname");
f = new FileOutputStream("/path/Employee_details.csv", true);
p = new PrintStream(f);
this.interpreter.setOut(p);
print(firstname+ "," + lastname);
f.close();
After execution of this script, you will get Employee_details.csv which will be containing 100 employee records and then you can compare it with your expected result.