Trello is one of my favourite tools for project planning and also time wasting – I guess you can spend hours planning your life (ha ha).
I’ve put together a sample board for anyone wanting to use Trello to help manage their house purchase. It’s pretty specific for 1st time buyers / renters but you can adapt it.
There are many ways to skin a cat and trying to use Selenium with WordPress CLI is new to me. Essentially, WordPress is ‘just’ a dynamic website using a SQL database with some themes and plugin files behind it.
Selenium is designed as a frontend browser test tool so keep that in mind for a minute and I assume you mean Selenium IDE. The result would be very brittle test cases if you built something up with Selenium IDE + WordPress CLI.
What is Brittle? Hard to maintain, test cases that need to be adjusted everytime you try to run them, a lot more test fails then passes.
Given your experience of testing is probably more than mine (which is easy) … I’d recommend you look at python or php and connect to the mySQL database and not use WP CLI (or start by having SequelPro or PHPMyAdmin running).
I believe this is what you are looking for as:
a. It separates the Front End user experience from the database b. Your Selenium IDE test cases won’t need WP CLI c. You won’t need to update your Selenium test cases as often as you probably do today d. You can trigger pyhton / php unit tests from terminal e. You can play around with database changes and just watch your Selenium test cases pass or fail f. you can the just drop / reset your database table and start test cases again 🙂
PS … I’ve written about using ChromeDriver / Python / Selenium to do very basic browser tests for my WordPress site.
This answer of mine originally appeared on WordPress Answers / Stackexchange
Answer by Damien for Can I get at WordPress code from inside a Selenium test?:
Mobile usage in the UK is on the increase. That’s all sounding good so far.
The latest communications report from Ofcom has shown a year on year growth of 1.6 million mobiles and the biggest growth in postpaid subscribers due to more customers taking out contracts for smartphones.
Want to download this for free? Read to the end of the presentation and copy the discount coupon code.
Selenium is great for automated testing of web-apps and I’ve been using the Firefox extension Selenium IDE for a few months now.
For completeness of automated testing for web apps you need to do this in a number of different browsers which Selenium IDE doesn’t do. So you’ll need to download and install Selenium on your Mac.
You can follow my Java
instructions to get started and install Selenium on your Mac.
Download Chromedriver to your Mac
Head over to the Chromedriver Project page and download the latest package.
You then need to unzip the package and then copy the file to /usr/bin
This is a hidden system folder so the easy way to get to this file is
- Open another finder window
- From the Go menu select Go To Folder
- Type /usr/bin and press enter
Now drag n drop the Chromedriver file from your Download folder to this directory. You’ll be prompted for you Admin password.
Finally, I suggest you restart your computer as the next step didn’t work when I tried it.
Basic Test Case for Chromedriver and Selenium
If you’ve already followed my guide to setup Selenium via Python then this will look familiar
Open a terminal window and type the following, pressing enter at the end of each line
from selenium import webdriver
driver = webdriver.Chrome()
After a few seconds, if all is well a new instance of Chrome will open
To finish the test just type
To exit Python from your open Terminal, press ctrl+z
If you own a Mac and want to get started with Selenium for Automated Testing of your web apps, then you’re already most of the way there. The Mac operating system already offers a number of baked in solutions and command line tools like Python, Ruby and Java.
Read my guide to setup Selenium with Python
which is probably easier if you want to get started immediately
Get started with Selenium IDE and Firefox
Selenium IDE is a browser extension for Firefox. It’s useful to use this to create test cases so install this first.
Download & Install Selenium Java Server
Now you just have to get the selenium standalone java server so type
(or check the project page for the latest Selenium Standalone Server)
Start the Selenium Standalone Java Server
While you’re in Terminal open a new shell / terminal window and type
java -jar selenium-server-standalone-2.24.1.jar[/php]
You’ll see some verbose scripting about the server starting and you can visit this URL to check the server status
Stop the Selenium Server
Copy and visit this URL in your browser
If you own a Mac and want to get started with Selenium for Automated Testing of your web apps, then you’re already most of the way there.
The Mac operating system already offers a number of baked in solutions and command line tools like Python, Ruby and Java.
How To Install Selenium on your Mac OSx
Mac already has Python and a package manager called easy_install, so open Terminal and type
sudo easy_install selenium
You need to run this as Sudo / Root or it can’t create the folders in protected directories.
1st Selenium Test Script from Command Line
Now open another Terminal / shell and type (press enter after each command)
from selenium import webdriver
driver = webdriver.Firefox()
If everything is setup, Firefox will open a new browser
To finish this test type
Install Climber – I must say this post did seem to be auto-translated into English.