Issue I have a button "Go Google" and an input box. When there is content in the input box, clicking the button will open a new tab for users to navigate another website. Otherwise, clicking the button will trigger nothing.
Continue readingTag: testing
[SOLVED] Using cURL for API automation in Karate
Issue I’m new to Karate I’m automating an API test where I need to upload a large file >50MB When I do so with Karate I get an error "Broken Pipe" and according to this question Broken pipe (Write failed)
Continue reading[SOLVED] can not extract response body to set environment variable
Issue I have response body from POST method like below { “status”: { “error”: false, “code”: 200, “message”: “Login success” }, “result”: { “data”: { “name”: “vv”, “email”: “[email protected]”, “session_key”: “xxx” } } } Then I want to extract that
Continue reading[SOLVED] Argument error due to ruby 3.0 deprecation
Issue I recently upgraded the ruby version of my app to 3.0. After which multiple test cases were failing but all of them were of the same kind. For ex, post :create, :params => { :identifiedBy => { :label =>
Continue reading[SOLVED] Rspec – Rails – How to follow a redirect
Issue Does anyone know how to make rspec follow a redirect (in a controller spec)? (e.g test/unit has follow_redirect!) I have tried “follow_redirect!” and “follow_redirect” but only get undefined method `follow_redirect!’ for #<Spec::Rails::Example::ControllerExampleGroup::Subclass_1:0xb6df5294> For example: When I create an account
Continue reading[SOLVED] How do I correctly freeze time w/ Timecop in my spec?
Issue I am trying to use a combination of Timecop and querying the arel where_sql to data, but I can’t seem to get Timecop to actually freeze the time. I’ve tried Timecop.freeze and Timecop.freeze(Time.now), both of which are slightly off
Continue reading[SOLVED] Check if all (hidden) elements contain a string with Minitest/Capybara
Issue I have a list of elements on a page (cards with comic books) and I want to test if all elements have the title containing a string (let’s say "spiderman"). <%= @comics.each do |comic| %> <div class="comic-card-text-box"> <p class="comic-card-title"><%=
Continue reading[SOLVED] What are the first steps in hardening a legacy Rails application?
Issue There is a production system that has been running for many years, first as a PHP application, then as a hybrid with Rails, and now completely in Rails. It’s unclear how long it has been around. The oldest git
Continue reading[SOLVED] How to retrieve JSON from request body using WebTau?
Issue I have sent a request to a REST servlet and it returns a JSON array I need to get the JSON as a String for further processing. Originally I used this to get the body: DataNode result = body.get("carList");`
Continue reading[SOLVED] http-only site to test REST requests?
Issue After the latest move by httpbin to HTTPS, apparently all sites that accepted test REST requests have disappeared. I’ve checked all mentioned in this post, and either they do not allow all kind of requests, or have also moved
Continue reading