Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 Skip Safari and IE for extension Browserstack unit tests #2816

Merged
merged 12 commits into from
Jun 21, 2024

Conversation

cy-moi
Copy link
Contributor

@cy-moi cy-moi commented Jun 18, 2024

Motivation

We do not need to run extension tests on Safari or IE

Changes

Add a browser configuration for extension only karma test.

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

Copy link

cit-pr-commenter bot commented Jun 18, 2024

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 160.50 KiB 160.50 KiB 0 B 0.00%
Logs 58.09 KiB 58.09 KiB 0 B 0.00%
Rum Slim 109.02 KiB 109.02 KiB 0 B 0.00%
Worker 25.21 KiB 25.21 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base Average Cpu Time (ms) Local Average Cpu Time (ms) 𝚫
addglobalcontext 0.003 0.001 -0.002
addaction 0.060 0.031 -0.029
adderror 0.061 0.033 -0.027
addtiming 0.001 0.001 -0.001
startview 1.510 0.923 -0.587
startstopsessionreplayrecording 1.156 0.849 -0.307
logmessage 0.023 0.019 -0.004
🧠 Memory Performance
Action Name Base Consumption Memory (bytes) Local Consumption Memory (bytes) 𝚫 (bytes)
addglobalcontext 22.05 KiB 20.17 KiB -1918 B
addaction 72.37 KiB 69.19 KiB -3260 B
adderror 87.20 KiB 84.39 KiB -2881 B
addtiming 17.82 KiB 16.00 KiB -1864 B
startview 314.70 KiB 318.61 KiB 3.91 KiB
startstopsessionreplayrecording 15.83 KiB 12.11 KiB -3801 B
logmessage 68.82 KiB 69.05 KiB 230 B

🔗 RealWorld

@cy-moi cy-moi marked this pull request as ready for review June 18, 2024 11:43
@cy-moi cy-moi requested a review from a team as a code owner June 18, 2024 11:43
test/unit/karma.bs.conf.js Outdated Show resolved Hide resolved
test/browsers.developer-extension.conf.js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated
@@ -20,7 +20,7 @@
"test": "yarn test:unit:watch",
"test:unit": "karma start ./test/unit/karma.local.conf.js",
"test:unit:watch": "yarn test:unit --no-single-run",
"test:unit:bs": "node ./scripts/test/bs-wrapper.js karma start test/unit/karma.bs.conf.js",
"test:unit:bs": "node ./scripts/test/bs-wrapper.js karma start test/unit/karma.bs.conf.js && node ./scripts/test/bs-wrapper.js karma start test/unit/karma.bs.conf.js --ext",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question❓: shall we proceed with skipping the Browserstack tests for the extension completely as we were already running it on headless chrome?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be simpler, yes!

Comment on lines 2 to 21
let { browserConfigurations } = require('../browsers.conf')

const karmaBaseConf = require('./karma.base.conf')

const isExtension = process.argv.includes('--ext')
browserConfigurations = isExtension
? browserConfigurations.filter((configuration) => !['ie', 'safari'].includes(configuration.name.toLowerCase()))
: browserConfigurations

module.exports = function (config) {
config.set({
...karmaBaseConf,
files: isExtension ? [...karmaBaseConf.files, 'developer-extension/src/**/*.spec.ts'] : karmaBaseConf.files,
plugins: [...karmaBaseConf.plugins, 'karma-browserstack-launcher'],
preprocessors: isExtension
? {
...karmaBaseConf.preprocessors,
'developer-extension/src/**/*.ts': ['webpack', 'sourcemap'],
}
: karmaBaseConf.preprocessors,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 suggestion: ‏this is not needed anymore, maybe remove it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to the rum-events-format and telemetry event types are unrelated, could you revert them?

@cy-moi cy-moi merged commit a3b98f0 into main Jun 21, 2024
20 checks passed
@cy-moi cy-moi deleted the congyao/skip-browsers-for-extension branch June 21, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants