...current JavaScript VM: window.addEventListener('error', function(event) { console.log("Got an uncaught error: ", event.error) }) Tip Testing tools like Jasmine might also listen to the error event and fail your test if...
Talking with APIs makes more fun using Postman. As an alternative you can also use command line tools like cURL...
...formerly known as "spec_candy.rb") is now available as a gem. It works, it is tested and there will be updates. Usage Add rspec_candy to your Gemfile. Add require 'rspec...
...might look as follows: shared: &shared email: info@example.com google_analytics: container: UA-123456-12 test: <<: *shared development: <<: *shared production: <<: *shared email: production@example.com Keys under the shared namespace are shared between...
Scenario outlines allow us to more concisely express repetitive examples through the use of a template with placeholders.
"I click on ..." step fixed Errors added to ToleranceForSeleniumSyncIssues::RETRY_ERRORS Capybara::ElementNotFound Selenium::WebDriver::Error::ElementNotVisibleError Selenium::WebDriver::Error...
Then ... Workarounds like this do not work reliably, will result in flickering tests and should be avoided. There is no known reliable way to detect if the browser...
...want to define a global matcher since you need it only for your specific test, there are two ways to do it: Custom matcher for a single group
Hashrocket Lunch n' Learn #1 with Avdi Grimm: Making Little Classes out of Big Ones A look at the pros...
...TLSv1.3 gelöst? Du weißt, wie du eine Webseite auf die Sicherheit der SSL Konfiguration testen kannst. Du kennst Certificate Transparency logs und weißt wofür das gut ist.
...Was kannst du hier herausfinden? Wie ist es möglich, dass die Informationen dort vorliegen? Teste makandra.de auf SSL Labs. Schau dir das Testergebnis an und verstehe welche Ergebnisse dir angezeigt...
...relative 'lib/capistrano/slackistrano' set :slackistrano, { klass: Slackistrano::CustomMessaging, channel: '#your-channel', webhook: 'https://hooks.slack.com/services/your/webhook/url', } Test Slackistrano: cap staging slack:deploy:test When you are satisfied, do a real deploy to...
Syn is a synthetic event library that pretty much handles typing, clicking, moving, and dragging exactly how a real user...
This works in all relevant browsers: document.activeElement You can use this in your Selenium steps, for example, to assert that...
I think this pattern is really useful not just for upgrading suites from Webrat, but really anywhere you have an...
...the middle of config/application.rb: require 'middleware/secure_cookies' config.middleware.insert_after ActionDispatch::Static, Middleware::SecureCookies Add a test to spec/requests/secure_cookies_spec.rb: describe Middleware::SecureCookies do it 'flags all cookies sent by the application as...
get 'https://www.example.com/test/set_cookie' response.headers['Set-Cookie'].should =~ %r(test=\S+; path=/; Secure$) end it 'will not flag cookies as secure when HTTPS is not being used (in...
...do not need a code review, but use the merge request to run a test pipeline: # Push branch, create a merge request, set the branch to be removed on merge...
...and set to merge when all tests are green ptm = push -u origin HEAD -o merge_request.create -o merge_request.merge_when_pipeline_succeeds -o merge_request.remove_source_branch Miscellaneous [core] editor = vim # Set...
When you roll custom URLs with hacks like routing-filter, you can put a spec like this into spec/routing/routing_spec.rb:
Als DevOps Engineer kann es häufiger vorkommen, dass du ein lokales Testsetup bauen musst, um eine bestimmte Software oder ein Tool zu testen. Dafür bieten sich VMs oder Linux Container...
...dein Notebook mit vorkonfigurierten Firewall-Regeln ausgestattet ist. Starte einen (oder mehrere Container) und teste, wie du dich auf der Shell Ebene zu diesen verbinden kannst. Stelle sicher, dass deine...
Using a gem like rails_state_machine Make sure that you have tests for all the changes you make. Note that your E2E-Tests should rather focus on...
...should create records in a state that is useful for the vast majority of tests. Tip We often use state machines to track the state of "wizard forms", i.e. long...
...yourself in Cucumber scenarios. Cucumber Factory We have a very useful gem to create test data in cucumber: cucumber_factory. Read through the README. Integrate it into your MovieDB and...
...you cannot find any opportunities to DRY up a Cucumber scenario, do this exercise (testing the file upload from before): Write a scenario: User can upload a movie poster in...
...Binding URL with the LogoutResponse. Keycloak does this when Front channel logout is disabled. Testing in development using a local keycloak server You can test this using a local keycloak...
...and is enabled per default This just worked for me, so no troubleshooting here Testing in development using a local keycloak server You can test this using a local keycloak...
Interesting talk about a team that integrated automated security testing into their BDD workflow. There is also a video of the talk...
...go fixtureless with Shoulda + Factory Girl. All good, except one problem. Slow as fuck tests. So here’s fast_context as a solution for it. fast_context compiles all the...
...should’s within a context into a single test...
...directly on GitLab, or by checking out the corresponding branch. You can assume that tests are green, but you need to confirm that everything requested in the issue is implemented...
...test coverage is good the code is maintainable What to do if the code is okay If the code is okay, you may either merge it into main yourself: