Shorter answer in single line is "Yes, both types uses same method but CSV if preferred because this provides real world data & analysis."
Long answer, for JMeter or any other performance test tools (as far as I know about others), it doesn't matter if you are using any CSV/Excel or any other data input method or not for creating load, as long as the number of threads are same (exception is related to application, which I tell later in answer). Performance test tools are concerned about the Load not about the input methods.
But, yes using parameterization in Performance testing is a recommended, preferred and good practice, because of many reasons like:-
- Want to test how the application react with different type of users
- Want to test how the application react with different type of data sets being returned from a search query.
- Want to achieve a more closer real world scenario
See, what a load test tool do? It only simulates 100s or 1000s of users and provide their results; which can't be generated manually. It means tool has to perform the work and task of 100s of users and every user is different in real world (with their test data, their permission set etc.). That's why we use CSV files to feed performance tests, so that it can provide results as per the different users load.
We do performance testing, to achieve benchmarks and to satisfy all
users need, what if we satisfy only 1 user need and generalize it to
rest of the N-1 users.
Another, reason is for making the performance tests Robust, for example (based on applications I have load tested)
- If application is having a business logic that 1 user can login only 1 time and if same user login again, then he/she will be logged out from 1st session. In such a case you have to pass all required 20 or more users via CSV files.
- Another is, lets say your application have some Business logic which accepts current date or some ID which is unique in application, now for the former part if you need to run your tests over a week or month, then either you need to change the script or just change the CSV file value and in the later case as the ID should be unique, so for creating 20 records you can't use the same hard coded value, hence you need to parameterize values
- Your application has different role users and permission set of different role of users is different and so the logic behind getting permission set. Now, if you use same user all the time, then either because of caching or because of getting same permission set again and again, you will not get the generalize result, it will be specific only for that hard coded role user
In addition to it, you will see the benefit of using CSV files, when you need to do volume testing (part of performance), here you will need to first create data with different data sets and then do performance testing, here using CSV files you can easily create multiple sets of data and increase size of your database. Load testing a Facebook shared image with 1000 comments with 100 users and load testing a Facebook image with no comment with 100 users both are different scenarios and with CSV file you can easily create 1000 comments with different or same number of users.
Because, firing a select query over 10 record table and 10,000 record table will show performance change and for setting benchmark you will need to insert these 10,000 records first in your application and then display them through application.