I am currently in the process of setting up an end-to-end test suite with specifications to assess the functionality of opening a file within the application. My goal is to collect performance data for each test specification, focusing on variables such as file size and time.
Given that the test specifications share similar structures, with variations only in terms of files and associated properties, I have utilized a JSON object (an array of data) to retrieve the file names. I attempted to implement a solution recommended here.
I endeavored to iterate through the test specifications using jasmine-data-provider, following guidance provided here. However, the specifications seem to be skipped during execution.
describe("App File Open", () => {
let fileNames: string[] = [];
const filePath: string = "common filepath for files"
beforeAll(() => {
fileNames = jsonFile["files"];
// ...
});
beforeEach(function (): void {
// ...
});
using(fileNames, (data: string) => {
it("open file " + data, () => {
// ...
inputElement.sendKeys(filePath + data);
// ...
});
});
afterEach(function (): void {
// ...
});
afterAll(function (): void {
// ...
});
});
The testing process appears to skip over the blocks without recognizing the test specifications (it).
"Jasmine started
Executed 0 of 0 specs SUCCESS in 0 sec."
I am wondering if there is a way to successfully loop through the specifications. If so, could someone kindly point out what might be missing here? (I apologize if this question has been addressed before)