Wednesday

Mock the backend using Postman

Postman has developed a new mock service to enable teams to simulate a backend server. Front-end developers can simulate each endpoint in a Postman Collection (and corresponding environment) to view the potential responses, without actually spinning up a back end.

Simulate a back end with Postman's mock service

Throughout the development process, delays on the front end or back end can hold up dependent teams from completing their work efficiently. Some API engineers already use Postman to work on endpoints without relying on a front-end UI to simulate API requests. Now, Postman has developed a new mock service to enable teams to simulate a backend server.


Here is also a good repository that uses postman collections demonstrating a variety of use cases for all REST and Platform Extension APIs

https://github.com/heremaps/postman-collections 

Monday

Design Patterns in Test Automation




Page Object Pattern


  • PageObject Element Map 
    • Properties of all web elements of the page and their locators
  • Page Object
    • Actions of the page
  • Page Object Validator
    • Validations/Assertions on the page
  • Tests Class 
    • Group of tests referencing the page objects, it can hold only a single instance of the page object. 


Facade Design Pattern


  • Facade
    • Holds methods that combine actions executed on multiple pages
  • Page Objects (ItemPage)
    • Holds the actions that can be performed on the page like Search and Navigate. Exposes an easy access to the Page Validator though the Validate() method. 
  • PageObject Element Map 
    • Properties of all web elements of the page and their locators
  • Page Object Validator
    • Validations/Assertions on the page
  • Tests Class 
    • Group of tests referencing the facade, it can hold only a single instance of the facade.


Singleton Design Pattern


  • Page Objects (ItemPage)
    • Holds the actions that can be performed on the page like Search and Navigate. Exposes an easy access to the Page Validator though the Validate() method. 
  • PageObject Element Map 
    • Properties of all web elements of the page and their locators
  • BasePage
    • Gives access to the child’s page element map class and defines a standard navigation operation.
  • BasePage 
    • Adds an instance to the child page’s validator class through the Validate method.
  • BaseSingleton 
    • This is an abstract class that provides a static property of its child instance.



Fluent Page Object Design Pattern


  • Page Objects (ItemPage)
    • Holds the actions that can be performed on the page like Search and Navigate. Exposes an easy access to the Page Validator though the Validate() method. 
  • BasePage
    • Gives access to the child’s page element map class and defines a standard navigation operation.
  • BasePage 
    • Adds an instance to the child page’s validator class through the Validate method.
  • BaseSingleton 
    • This is an abstract class that provides a static property of its child instance.
  • BaseElementMap
    • Provides easier access to current browser and functions to switch between different frames.
  • BasePageValidator
    • Gives all child validators instance to the current element map and the page object itself.

Source:  https://dzone.com/articles/observer-design-pattern-design

Google has implemented a headless option for Chrome

New Headless Chrome With Selenium WebDriver

So if you hadn't heard, Google has implemented a headless option for Chrome. This will be included from version 59, however you can download it now and a play using the Canary install. So I did just that.


Happy testing!

Friday

And I thought Machine Learning was cool..

Facebook is building brain-computer interfaces for typing and skin-hearing


Facebook is building brain-computer interfaces for typing and skin-hearing

Today at F8, Facebook revealed it has a team of 60 engineers working on building a brain-computer interface that will let you type with just your mind without invasive implants. The team plans to use optical imaging to scan your brain a hundred times per second to detect you speaking silently in your head, and translate it into text.