Logo

dev-resources.site

for different kinds of informations.

rails system test, save failed screenshots

Published at
9/24/2024
Categories
test
rails
screenshot
github
Author
ugifractal
Categories
4 categories in total
test
open
rails
open
screenshot
open
github
open
Author
10 person written this
ugifractal
open
rails system test, save failed screenshots

When setting up github actions for running system tests, it is sometimes difficult to know or debug when several tests fail to run but are running well locally.

So why don't you just save the failed screenshots so we know what the actual error was during the test?

First, we need to change the Rails config, so errors will appear in the browser just like what we get when running locally in development mode.

# config/environments/test.rb

config.consider_all_requests_local = true
Enter fullscreen mode Exit fullscreen mode

To save screenshots, we can upload the screenshots to artifacts. Uploads steps only will be performed if the system test fails to run.

      - name: Run system test
        run: bundle exec rails test:system
      - name: Upload screenshots
        uses: actions/upload-artifact@v4
        if: failure()
        with:
          name: screenshots
          path: tmp/screenshots
Enter fullscreen mode Exit fullscreen mode
screenshot Article's
30 articles in total
Favicon
From 80 to 8000/m: A Journey of SEO Optimization (Part 1)
Favicon
CodeSnap : prendre des captures d'Γ©cran de code dans VS Code
Favicon
rails system test, save failed screenshots
Favicon
πŸš€ πŸ“Έ Creating Accessible and Stunning code screenshots
Favicon
AVIF Studio - Web page screen capture Chrome extension Made with Svelte and WebAssembly.
Favicon
Edge: Screenshots einer Seite erstellen ohne Addons
Favicon
Web Scraping Using Image Processing
Favicon
Edge: Create screenshots of a page without addons
Favicon
How to Perform Screenshot Comparison in Playwright
Favicon
How to take screenshots effectively on windows 11
Favicon
How to screenshot webpages in Golang
Favicon
Screenshot all your pages
Favicon
CodeSnap: Take Code Screenshots In VS Code
Favicon
Rendering NativeScript Angular Templates and Components into images
Favicon
How to run a code in editor in Atom IDE
Favicon
Take a Full-Page Screenshot in Browser (without extension or add-on)
Favicon
Tomar capturas de pantalla facilmente en i3wm
Favicon
Building A Serverless Screenshot Service with Lambda
Favicon
Android - How to do Screenshot Testing in Jetpack Compose
Favicon
How to capture a screenshot of the single window you want (using command line).
Favicon
How to Scan QR Code from Desktop Screen in Python
Favicon
react-native detect when user takes a screenshot
Favicon
Set Flameshot as default screenshot app on Ubuntu :)
Favicon
How to capture Screenshot within the browser
Favicon
Capture Website Screenshots with Python
Favicon
Reducing a Screenshot Size in Mac
Favicon
Employee Monitoring Tool to improve employee productivity
Favicon
Configuring screenshots in Mac
Favicon
How to take a screenshot of Jira kanban
Favicon
How To Capture Screenshots In Selenium? Guide With Examples

Featured ones: