scalyr / dataset-addon-for-splunk

The DataSet Add-on for Splunk provides integration with
Apache License 2.0
4 stars 6 forks source link

refactor and improve tests #74

Closed zdaratom-s1 closed 1 year ago

zdaratom-s1 commented 1 year ago
zdaratom-s1 commented 1 year ago

Note that if the application fails to deploy test will fail no matter if you go via url or clicking through menu. Clicking through menu is imho just slower.

I understand that actions approach, on the other hand such a steps are bit more complicated to use since you need to keep context in test. I have found idempotent steps be more convenient and reusable.

martin-majlis-s1 commented 1 year ago

When I check the current run: https://github.com/scalyr/dataset-addon-for-splunk/actions/runs/5975394444/job/16211261116?pr=74

  Slow test file: [chromium] › alert_action.spec.ts (3.0m)
  Slow test file: [chromium] › inputs.spec.ts (43.1s)
  Slow test file: [chromium] › examples.spec.ts (27.0s)
  Slow test file: [chromium] › search.spec.ts (20.6s)

With some previous run: https://github.com/scalyr/dataset-addon-for-splunk/actions/runs/5964013188/job/16178341279

  Slow test file: [chromium] › inputs.spec.ts (1.1m)
  Slow test file: [chromium] › search.spec.ts (42.1s)
  Slow test file: [chromium] › alert_action.spec.ts (31.3s)
  Slow test file: [chromium] › examples.spec.ts (23.6s)
  Slow test file: [setup] › global.setup.ts (15.4s)

The only speed up is as expected on the inputs/search since there are multiple tests. I agree, that it's fine to use url to get somewhere, but there should be at least one test for the navigation, to make sure, that it works.

zdaratom-s1 commented 1 year ago

I have added new test verifying that add on is deployed properly (asserting link and menu items)