These examples assure that a model can withstand applied pressure (e.g., a heavy data load).
These types of tests are relevent for certain types of models.
For data structures, these tests add many elements into the structures apply "pressure".
The purpose of smoke tests that "load data" is to apply some "load" (pressure) on the software.
It is suprising how generally easy it is to loads of any desire size (as shown below).
The second test below is extremely important. It uses "proper objects" (e.g. employees) rather than primitive-like values (e.g, strings, integers). Using proper objects can expose more bugs.
smokeTest_load() {
let dynArray = DynamicArray.newEmpty();
for (let i = 0; i < 1000; i++)
dynArray.add('Asha' + i);
for (let i = 0; i < 1000; i += 50)
println(`Element at [${i}]: ${dynArray.get(i)}`);
}
smokeTest_object_load() {
let dynArray = DynamicArray.newEmpty();
for (let i = 0; i < 5000; i++)
dynArray.add(new Employee(i, 'Name' + i));
for (let i = 0; i < 5000; i += 250)
println(`Element at [${i}]: ${dynArray.get(i)}`);
}