In this video I provide an overview of PHP with basic functions for automating web applications.
â–º An introduction to PHP
â–º An overview of REGEX in PHP
â–º Screen Scraping Web Site using PHP
â–º Processing JSON in PHP
â–º Add assertions to live code to guard against application changes
â–º A walkthrough of the code I use to automate Instagram using PHP.
- A quick overview of PHP as an option for Automating Web Applications
- this is not 'test automation', this is me automating some tasks
- I am not using a test framework and I am not asserting anything
- But PHP is pretty easy to install and is available on most web servers so is pretty simple
- PHP is a scripting language and is embedded within HTML so I create an HTML page, call it .php and anything within angled brackets and `?php ... ?` is executed as PHP
- important functions I have used to automate Instagram are
- cURL - `curl_init`
- JSON - `json_decode` and `json_encode`
- `preg_match` for REGEX
- I like the PHP manual
- pretty much every function has examples so you can see how to use it
- with comments from people using it
- My PHP is pretty hacky
- I don't tend to unit test it
- I use a lot of echo statements when I'm debuggging
- I do use Objects and Functions to keep code cleaner
- I use PHPStorm from JetBrains as my IDE
- easy to protect 'apps' with basic auth through .htaccess
*************
*************
►► Contact Details:
Read my writing and blogs at:
Follow me on social media:
*************
►► Read my books
★ "Dear Evil Tester" - explore the tester's mind
★ "Java For Testers" - learn to code in Java
★ "Automating and Testing a REST API - a case study"
*************
►►Learn skills from my online training courses
★ Selenium WebDriver With Java
★ Technical Web Testing 101
★ Evil Tester Talks Technical Testing
★ Case Study: Java Desktop Application Technical Training
*************