Metaphysics and Software Design

When I say that this is an experimental blog post I mean it.  I’m thinking out loud here. Those who know me know that I am somewhat critical of some modern advancements in software design.  It’s not that I’m a Luddite or anything but the root of my discontent is that software and real life often do not match well.  Inbox by Google is a good example of this.  They refuse to put an “unread” feature into their software.  It messes with their blessed workflow.  Never mind that sometimes real life

Validating Individual Shipping Methods

Out of the box Magium will select the first shipping method on the screen. But there might be some times when you need to validate a particular shipping method, or force an error to be thrown if a shipping method does not exist. ’tis now easy to do. use MagiumMagentoAbstractMagentoTestCase; class ShippingTest extends AbstractMagentoTestCase { … Continue reading “Validating Individual Shipping Methods” Powered by WPeMatico

Testing Terms and Conditions in Magento

A few days ago in response to an email newsletter I sent out one individual responded back asking about testing Terms and Conditions in Magento. When building out Magium, and its many components, I focus first on the things that I find important. If I haven’t used a feature then it won’t be very high … Continue reading “Testing Terms and Conditions in Magento” Powered by WPeMatico

Asserting page load times in Magento with Magium

Validating SLAs (Service Level Agreements) is often part of executing browser tests. With Magium you can now include page timings as part of your test. Say, for example, that part of your SLA is that a page must be rendered in less than 5 seconds. This is done by using the TTFBLoadedLessThan, DOMPageLoadedLessThan or DOMContentLoadedLessThan … Continue reading “Asserting page load times in Magento with Magium” Powered by WPeMatico

How to ensure there are no errors on a page

An easy way to check for errors is to open the browser console log. But that’s not so easy to automate, right? Actually it’s fairly easy. If you’re testing in Magium you can execute an assertion to validate that the browser log is empty, indicating that there are no errors on the page. It’s really … Continue reading “How to ensure there are no errors on a page” Powered by WPeMatico

Validating that page assets are cached

It’s not just HTML elements that need to be tested, and sometimes not even testing that images or CSS files are being tested. Sometimes you need to test things like server configurations. Magium’s position is that there are a wealth of different areas where browser testing can benefit your organization. Validating browser testing configurations is … Continue reading “Validating that page assets are cached” Powered by WPeMatico

Drawing floating columns/bars in Flot

Let me say first of all, that I mostly like Flot as a charting application. It provides a lot of charting functionality and is reasonably good looking. But sometimes it is a bit of a pain to deal with. Case in point; I wanted to create a chart that had floating columns (Flot, in my opinion incorrectly, calls vertical columns, bars). In essence, what I wanted was this: Well, it can be done but, after I spent far too many hours trying to figure out how, it is not exactly clear

ChromeDriver hangs with Selenium Server and Xvfb

I have spent several hours working on an issue while running Selenium Server under Xvfb with ChromeDriver.  There would basically be a 30 second timeout when connecting to Selenium Server from WebDriver with this being the exception: 1) Tests\Magium\AbstractTestCase\CoreAssertionTest::testElementDisplayed Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {“desiredCapabilities”:{“browserName”:”chrome”,”platform”:”ANY”}} Operation timed out after 30001 milliseconds with 0 out of -1 bytes received /var/lib/jenkins/jobs/Magium (personal)/workspace/vendor/facebook/webdriver/lib/Exception/WebDriverException.php:89 /var/lib/jenkins/jobs/Magium (personal)/workspace/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:254 /var/lib/jenkins/jobs/Magium (personal)/workspace/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:97 /var/lib/jenkins/jobs/Magium (personal)/workspace/lib/WebDriver/WebDriverFactory.php:17 /var/lib/jenkins/jobs/Magium (personal)/workspace/vendor/zendframework/zend-di/src/Di.php:547 /var/lib/jenkins/jobs/Magium (personal)/workspace/vendor/zendframework/zend-di/src/Di.php:321 /var/lib/jenkins/jobs/Magium (personal)/workspace/vendor/zendframework/zend-di/src/Di.php:265 /var/lib/jenkins/jobs/Magium (personal)/workspace/lib/TestCase/Initializer.php:53 /var/lib/jenkins/jobs/Magium (personal)/workspace/lib/AbstractTestCase.php:70 I strace()ed the process and it came down to a read() on

Browser Testing Twitter OAuth Accounts

I added a Twitter OAuth integration in @magiumlib so you can easily do authentication automation. — Kevin Schroeder (@kpschrade) April 6, 2016 This is a simple library to help browser tests perform OAuth logins to Twitter. To install composer require magium/twitter To use: use MagiumTwitterActionsAuthenticateTwitter; class TwitterTest extends MagiumAbstractTestCase { public function testLogin() { // Do something that forwards the browser to the twitter OAuth page. $action = $this->getAction(AuthenticateTwitter::ACTION); /* @var $action AuthenticateTwitter */ $action->execute(); } } Setting the username and password There are two ways to set the