question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add screenshot integration tests

See original GitHub issue

We should do automated browser testing for each PR to make sure we don’t have regressions like #212 again and to make sure our injection mechanism works as expected.

I have never done that, so if somebody has tips on free services we could use to test on IE10+ and all major evergreen browser that’d be 👌 It basically just needs to make sure our example in the example/ folder renders as expected in all browsers and doesn’t throw errors.

The best way to go about this would be to use screenshot integration testing, similar to what we do for the styled-components website. Essentially, have a simple page that you render with puppeteer, then screenshot it and compare it against a stored screenshot in the repo. If there’s any diversion between the screenshots (i.e. if any injected styles have changed), fail the tests.

This would be a great first task for anybody wanting to start contributing to styled-components. Take a look at the website PR (https://github.com/styled-components/styled-components-website/pull/168) and implement something based on that in this repo.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
FezVrastacommented, Jan 3, 2017

I can take this, I literally just finished tweaking the SauceLabs tests for one of my projects, I could simply copy-paste the setup.

We should add karma and karma-sauce-launcher to be able to run mocha in the SL browsers.

Would it be okay @mxstbr?

3reactions
mxstbrcommented, Dec 15, 2017

Awesome @maciej-ka, it’s all yours! Looking forward to the PR, if you got any questions ping me on Spectrum: https://spectrum.chat/styled-components

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flutter automated screenshot testing using the integration_test ...
Integration tests help in evaluating the performance of a complete app to verify all the widgets and services work together as expected.
Read more >
Take screenshot during Flutter integration tests
Take screenshot during Flutter integration tests · 1) Replace your test_driver/integration_test.dart by this code: · 2) Go into your ...
Read more >
Flutter integration_test - Making screenshot - Stack Overflow
The flutter integration test example has the skeleton to perform screenshots. First create the driver for the integration test
Read more >
New In Flutter 2.8, Screenshot Goldens In Integration Testing
We can now use screenshots to have goldens testing in integration testing. ... And our configuration is put in the test-driver subfolder:.
Read more >
add screenshot capability to e2e integration tests · Issue #51890
These screenshots should be easy to trigger from the widget tests, but should be taken on the platform (by the browser's driver).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found