The TirePressureMonitoringSystem coding kata is an situation that is very hard to test without dependency injection. It simulates an Alarm which is part of tire pressuring system. The implemented sensor gives back random data. The task is to restructure the Alarm class, but not the sensor to make it unit-testable. I think the kata showcases why DI is so ...
Yes, proper dependency injection benefits testing and TDD greatly because it allows to test individual components/dependencies easier - mocking/stubing each of the dependencies without affecting any global variables or global dependencies which other parts of an application may depend upon or other tests might use.
I found it quite handy to write unit and ...
should it represent a defect in the Application under test?
No, it might be working, but you cannot verify. You do need to monitor and follow it up somehow. Therefore ignoring/skipping the test-method and create a task in your workflow-system might make sense, but this could lead to a lot of waste handling and monitoring these issues. Do make sure you fix ...
Is there any industry standard guidance about a situation like this?
Not that I know of or like, but..
for no discernible reason
Unless you use randomness in your environment there is no such thing as un-explainable events. I can accept unrepeatable and unpredictable, but not totally random things.
I can think of (at least) three approaches to ...
Let's start from the bottom line- unless you revolutionize everything there will be no magic solutions.
Martin Fowler describes here the most common approach- test against a simplified copy of the external services, and occasionally verify that those copies behaves the same as the source.
The problem with this approach, beyond the obvious of ...
You can see many general advantages of maven from other answers, but the main two reasons for having a build automation tool like maven in the test framework would be:
Maven POM file allows adding details of dependencies like, which tool, which version, from which repository
This ensures that all stakeholders or users of your test ...
Apache Maven is a software project management and comprehension tool.
Based on the concept of a project object model (POM), Maven can manage
a project's build, reporting and documentation from a central piece of
Maven in Java based test automation projects is often only used as a build-runner and depency manager, but it has way more ...
POM is surely one of the main advantages of Maven. But there are more:
Maven provides support for managing the full life cycle of a test project
Maven enables you to extend your project with maven plugins (test reports etc.)
JARS are done automatically this means that Maven automatically downloads the corresponding files
POM is centralized hence each tester ...
In situations like this i have tended towards trying to perform a basic health check on the connection before using it. I then attempt to capture relevant information that might explain later errors and ensure its in the logs.
I've had a few situations like this and eventually with a enough (or just different) logging you find the tiny detail that explains ...
From your description, I think you have missed setting up the browser's selenium driver. For this example I am using ChromeDriver 2.39.562718, found here: https://sites.google.com/a/chromium.org/chromedriver/
For reference, your POM.xml file could have these three dependencies below. But this is not enough. Your will need (for these dependencies) the '...
You should mock / stub those dependencies.
WebMock can do that. It stubs at a low HTTP client lib level.
Add require 'webmock/cucumber' in the support/env.rb file
Simulate basic http
stub_request(:get, "www.test.com").to_return(:body => "Test")
stub_request(:post, "www.test.com").with(:body => "test", :header => "Content-Type: ...