Annotated slides from Berlin PHP Usergroup Meetup, 4th April 2017.
---
Not only unit tests but also end-to-end tests in real browser are important part of test automation and test pyramid. So let's have a look how to easily write and run Selenium functional tests using PHPUnit and Steward.
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...Ondřej Machulda
Annotated slides for phpCE workshop on November 3, 2017.
Workshop repository: https://github.com/OndraM/selenium-workshop-phpce
The workshop covered:
- setting up local development environment (using Docker)
- practical examples of functional tests implementation
- exploring possibilities of Selenium WebDriver
- parallel test execution using Steward
- hands-on Page Object design pattern
- dealing with asynchronous elements of web-pages (AJAX, JavaScript)
- general tips & tricks how to keep a maintainable suite of functional tests in a long-term
Efficient JavaScript Unit Testing, May 2012Hazem Saleh
One of the biggest challenges of many web applications is the support on the different browsers with different versions. JavaScript code that runs on Safari does not necessarily mean it will work on IE or Firefox or Google chrome. This challenge is inherited from the lack of testing the JavaScript code that lives in the presentation tier from day one. Without unit testing the JavaScript code, organization will pay much money for testing, re-testing, and re-testing web applications for just deciding upgrading or supporting new browsers. This presentation shows the solution of this problem.
For much of its existence, JavaScript has been slow. No one complained until developers created complex web applications with thousands of lines of JavaScript code. Although newer JavaScript engines have improved the situation, there’s still a lot to understand about what makes JavaScript slow and what you can do to speed up your code.
Key items of the presentation will be:
What is PHPUnit
Whats new in testing in Drupal 8
Core Classes and Components
Core/ Contibuted modules
PHPUnit file structure, namespace, and required metadata
Running PHPUnit tests.
Available tools for running automated tests.
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...Ondřej Machulda
Annotated slides for phpCE workshop on November 3, 2017.
Workshop repository: https://github.com/OndraM/selenium-workshop-phpce
The workshop covered:
- setting up local development environment (using Docker)
- practical examples of functional tests implementation
- exploring possibilities of Selenium WebDriver
- parallel test execution using Steward
- hands-on Page Object design pattern
- dealing with asynchronous elements of web-pages (AJAX, JavaScript)
- general tips & tricks how to keep a maintainable suite of functional tests in a long-term
Efficient JavaScript Unit Testing, May 2012Hazem Saleh
One of the biggest challenges of many web applications is the support on the different browsers with different versions. JavaScript code that runs on Safari does not necessarily mean it will work on IE or Firefox or Google chrome. This challenge is inherited from the lack of testing the JavaScript code that lives in the presentation tier from day one. Without unit testing the JavaScript code, organization will pay much money for testing, re-testing, and re-testing web applications for just deciding upgrading or supporting new browsers. This presentation shows the solution of this problem.
For much of its existence, JavaScript has been slow. No one complained until developers created complex web applications with thousands of lines of JavaScript code. Although newer JavaScript engines have improved the situation, there’s still a lot to understand about what makes JavaScript slow and what you can do to speed up your code.
Key items of the presentation will be:
What is PHPUnit
Whats new in testing in Drupal 8
Core Classes and Components
Core/ Contibuted modules
PHPUnit file structure, namespace, and required metadata
Running PHPUnit tests.
Available tools for running automated tests.
Cover the advantages of test driven development, the reasons for pushing it all the way to the browser level, and then explore the options for testing JavaScript, look at some examples, and then integrate the tests into our existing development workflow.
Test all the things! Automated testing with Drupal 8Sam Becker
With Drupal 8 released, one of the most important aspects of building a website or module has changed dramatically for the better. Developers now have a myriad of tools at their disposal to be able to test their code. If you are interested in improving your code and preventing bugs, but are unfamiliar with acronyms like BTB, KTB and WTB, this session is for you. If you’ve dabbled in testing but haven’t explored the depths of PHPUnit or Mink, then this session is for you.
Drupal 8 supports multiple ways to test your code, which gives developers the confidence to change functionality and ensure that regressions are caught early.
This session will introduce attendees to the following methods in Drupal 8 for providing test coverage:
Unit Tests
Kernel Tests
Functional Tests
Behavioral Tests
We will discuss when to use each kind of test, and how to handle potentially frustrating situations.
Code samples: https://github.com/ebeyrent/apod
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016Gavin Pickin
Everyone who wasn't writing JavaScript, probably is now. Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript.
That's great, but how do we test it? In ColdFusion we have CFCs, most languages have classes... but JavaScript doesn't have classes (yet).
So how do I write unit tests, what units are there, and how do I make my code look like that? JavaScript is a flexible language, and with great flexibility comes great complexity and responsibility. Take your JavaScript spaghetti and make it unit testable.
Attendees should have some exposure to JavaScript, but this is for the Professional Newbie... who always needs to learn and adapt.
Automated php unit testing in drupal 8Jay Friendly
An overview of PHPUnit Automated testing in Drupal 8, including a comparison of manual testing vs automated testing, the pros and cons of automated testing, and the types of automated tests available in Drupal 8.
One commit, one release. Continuously delivering a Symfony project.Javier López
For the last few months we've been implementing a Continuous Delivery pipeline for the redesign of Time Out. In this talk I will demonstrate a real life example of what our pipeline looks like, the different tools we've used to get it done (phing, github, jenkins, ansible, AWS S3, ...), and peculiarities for PHP and Symfony2 projects. Most importantly, I'll be looking at things we've struggled with along the way and the lessons we've learnt.
Continous Delivering a PHP applicationJavier López
For the last few months we've been implementing a Continuous Delivery pipeline for the redesign of Time Out. In this talk I will demonstrate a real life example of what our pipeline looks like, the different tools we've used to get it done (phing, github, jenkins, ansible, AWS S3, ...), and peculiarities for PHP and Symfony2 projects. Most importantly, I'll be looking at things we've struggled with along the way and the lessons we've learnt.
Testing frontends with nightwatch & saucelabsTudor Barbu
Sooner or later, any application needs to be released. And before that, it needs to be tested. Ideally!
The purpose of this talk is to explore Nightwatch as a testing framework, how to set up an automated CI system using Travis and using SauceLabs as a browser farm.
See for code https://github.com/motanelu/bcn-js-news-widget
how to write functional tests with Selenium. how to set up Selenium Testing On Grails Apps In Continuous
Integration Using two approaches: The long way – using Maven and/or Ant The fast way, using the grails-
selenium-rc plug-in - ( see
http://buildchimp.com/wordpress/?p=241 )
Cover the advantages of test driven development, the reasons for pushing it all the way to the browser level, and then explore the options for testing JavaScript, look at some examples, and then integrate the tests into our existing development workflow.
Test all the things! Automated testing with Drupal 8Sam Becker
With Drupal 8 released, one of the most important aspects of building a website or module has changed dramatically for the better. Developers now have a myriad of tools at their disposal to be able to test their code. If you are interested in improving your code and preventing bugs, but are unfamiliar with acronyms like BTB, KTB and WTB, this session is for you. If you’ve dabbled in testing but haven’t explored the depths of PHPUnit or Mink, then this session is for you.
Drupal 8 supports multiple ways to test your code, which gives developers the confidence to change functionality and ensure that regressions are caught early.
This session will introduce attendees to the following methods in Drupal 8 for providing test coverage:
Unit Tests
Kernel Tests
Functional Tests
Behavioral Tests
We will discuss when to use each kind of test, and how to handle potentially frustrating situations.
Code samples: https://github.com/ebeyrent/apod
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016Gavin Pickin
Everyone who wasn't writing JavaScript, probably is now. Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript.
That's great, but how do we test it? In ColdFusion we have CFCs, most languages have classes... but JavaScript doesn't have classes (yet).
So how do I write unit tests, what units are there, and how do I make my code look like that? JavaScript is a flexible language, and with great flexibility comes great complexity and responsibility. Take your JavaScript spaghetti and make it unit testable.
Attendees should have some exposure to JavaScript, but this is for the Professional Newbie... who always needs to learn and adapt.
Automated php unit testing in drupal 8Jay Friendly
An overview of PHPUnit Automated testing in Drupal 8, including a comparison of manual testing vs automated testing, the pros and cons of automated testing, and the types of automated tests available in Drupal 8.
One commit, one release. Continuously delivering a Symfony project.Javier López
For the last few months we've been implementing a Continuous Delivery pipeline for the redesign of Time Out. In this talk I will demonstrate a real life example of what our pipeline looks like, the different tools we've used to get it done (phing, github, jenkins, ansible, AWS S3, ...), and peculiarities for PHP and Symfony2 projects. Most importantly, I'll be looking at things we've struggled with along the way and the lessons we've learnt.
Continous Delivering a PHP applicationJavier López
For the last few months we've been implementing a Continuous Delivery pipeline for the redesign of Time Out. In this talk I will demonstrate a real life example of what our pipeline looks like, the different tools we've used to get it done (phing, github, jenkins, ansible, AWS S3, ...), and peculiarities for PHP and Symfony2 projects. Most importantly, I'll be looking at things we've struggled with along the way and the lessons we've learnt.
Testing frontends with nightwatch & saucelabsTudor Barbu
Sooner or later, any application needs to be released. And before that, it needs to be tested. Ideally!
The purpose of this talk is to explore Nightwatch as a testing framework, how to set up an automated CI system using Travis and using SauceLabs as a browser farm.
See for code https://github.com/motanelu/bcn-js-news-widget
how to write functional tests with Selenium. how to set up Selenium Testing On Grails Apps In Continuous
Integration Using two approaches: The long way – using Maven and/or Ant The fast way, using the grails-
selenium-rc plug-in - ( see
http://buildchimp.com/wordpress/?p=241 )
Talk at RubyKaigi 2015.
Plugin architecture is known as a technique that brings extensibility to a program. Ruby has good language features for plugins. RubyGems.org is an excellent platform for plugin distribution. However, creating plugin architecture is not as easy as writing code without it: plugin loader, packaging, loosely-coupled API, and performance. Loading two versions of a gem is a unsolved challenge that is solved in Java on the other hand.
I have designed some open-source software such as Fluentd and Embulk. They provide most of functions by plugins. I will talk about their plugin-based architecture.
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Puneet Kala
Presentation from JAB-2014, I have talked about how we have setup PHPUnit and Selenium Webdriver for Testing Joomla CMS!,
How we can setup System test Suite for a Joomla! Component
Mastering Test Automation: How To Use Selenium SuccessfullySpringPeople
In this slide, identify what to test and choose the best language for automation. Learn to write maintainable and reusable Selenium tests and add UI layout test as part of automation using Galen framework. This slide will also guide you in reporting structure by using external plugin's, an illustration covering cross browser testing (Running selenium grid with Docker) and explain Code repository (Git) and Jenkins CI tool.
Selenium Automation in Java Using HttpWatch Plug-in Sandeep Tol
This article will give the developers and testers who use Java selenium script for Browser Simulations and automation for IE browser to capture HTTP logs using HTTPWatch Plug-in
HTTP Watch comes with inbuilt API support to integrate with selenium scripts written in C# or PHP scripts . But unfortunately they don’t have Support for JAVA.
The solution given here is to use Java COM bridge and invoke HTTP Watch plugin API from Java based selenium scripts.
Using this article you would learn how HttpWatch plug-in which component can be easily interfaced with Java code and then executed via selenium script.
Slides from the Selenium Clinic Tutorial from Eurostar 2012 hosted by Simon Stewart and Alan Richardson. The tutorial was awarded "Best Tutorial" at the conference.
The reference slides were excerpted from Alan Richardson's online WebDriver course hosted at Udemy.
http://www.udemy.com/selenium-2-webdriver-basics-with-java/
Using HttpWatch Plug-in with Selenium Automation in JavaSandeep Tol
This article will give the developers and testers to use Java programming for capturing IE browser HTTP logs using HTTP Watch Plug-in (V10) , in Selenium scripts
HTTP Watch comes with inbuilt API support to integrate with selenium scripts written in C# or PHP scripts . Refer http://apihelp.httpwatch.com/#Automation%20Overview.html
But unfortunately they don’t have API written for JAVA. There are no samples or articles available to use Httpwtach with Java interface.
Using this article you would learn how HttpWatch plug-in which component can be easily interfaced with Java code and then executed via selenium script.
The solution is to use Java COM bridge and invoke HTTP Watch plugin API from Java based selenium scripts.
Web Application Test In Ruby, is a testing framework for the web applications. Since it's built on ruby it would take the advantage of object oriented principles of ruby and makes the regression/functional testing very very simple. This presentation aims to introduce the WATIR, assists in installing and also testing with a simple test case.
San Francisco Java User Group presents Chris Bedford who talks about:
- How to write functional tests with Selenium (including explaining its IDE, architecture, RC, and alternatives like Canoo WebTest)
- How to set up Selenium testing for web apps in continuous integration using Maven, Ant, Cargo, etc.
- How to use Hudson for build server (brief overview)
January 12, 2010 in San Francisco, CA
http://www.sfjava.org/calendar/11982857/
Hosted by SUPINFO International University
Sponsored by TEKsystems, Guidewire Software, Sun, O'Reilly, JetBrains, and Marakana.
Video by Max Walker
Organized by Marakana
Unmesh Gundecha delivered a session on "Selenium Powertools" at #SeleniumSummit21
Technology focused IT professional offering vast experience leveraging Software Engineering, Agile Software Development, Test Automation & DevOps methodologies to deliver highly effective and creative solutions to business and technology challenges. Utilizes highly attuned analytical skills to develop IT and business strategies employing leading/cutting-edge technologies to increase productivity & efficiency and organised with a strong capacity to prioritize workload, delegation, and steer project completion with established deadlines. Experience in building and leading small to a large specialist team on critical project deliveries. Passionate about Technology, Automation, UI/UX and Design.
To know more about #SeleniumSummit21 please check : https://seleniumsummit21.agiletestingalliance.org/
Selenium a WebDriver - přítomnost a budoucnost Ondřej Machulda
Konference Test Stack, 6. června 2019, Praha
Kam se testování přes Selenium posunulo?
* Co je to standard W3C WebDriver, proč na něj Selenium přechází a co se díky němu mění
* Jakou výhodu přináší to, že se o integraci protokolu do prohlížečů starají sami jejich výrobci (Mozilla, Google, Apple)
* Jaké nové možnosti přineslo end-to-end testování přes Selenium v poslední době – například headless režim Firefoxu a Chrome
* Lokální zprovoznění Selenia i vybraného prohlížeče jedním příkazem – spuštěním Selenia v Dockeru si můžeme ušetřit spoustu obtíží a nekompatibilit, na které jsme dříve mohli narazit
Budoucnost Selenia:
* Co přinese Selenium 4.0? Jak se na něj připravit, abychom pak nemuseli věnovat upgradu veliké úsilí?
* Kam směřuje budoucí role Selenia? Možná ho totiž nebudeme potřebovat na to, na co ho používáme dnes.
* Kdy má smysl použít alternativy k Seleniu jako Pupeteer nebo Cypress? A proč Selenium rozhodně není překonané a naopak je jeho potenciál vyšší, než kdy dříve?
phpCE, 27. října 2018, Praha
Asi jste v poslední době slyšeli o GraphQL. Je tedy opravdu čas opustit REST API, jak někteří tvrdí? Myslím, že zdaleka ne - a chtěl bych vám ukázat existující alternativu pro vytváření dobrých REST API - standard JSON API, okolo kterého se rozvíjí zajímavý ekosystém i v PHP.
Vývoj na poli automatizace testování webů otevírá spousta možností, které by ještě před pár lety byly nereálné. Podíváme se na některé aktuální trendy a ukáži pár moderních technologií a služeb, které vám mohou pomoci automatizovat (a tedy urychlit, zlevnit nebo zlepšit) různé části QA procesu: visual testing, docker, web performance testing.
Funkční testování – chybějící vrchol pyramidy (WebExpo 2016)Ondřej Machulda
Záznam přednášky: https://www.webexpo.cz/praha2016/prednaska/funkcni-testovani-chybejici-vrchol-pyramidy/
Automatické testování nejsou zdaleka jenom unit-testy - ty sice tvoří základ takzvané testovací pyramidy, ta by ale neměla zůstat nedostavěná. Přednáška o tom, kdy a jak se během vývoje věnovat také vyšší vrstvě testů - funkčnímu testování alias testům uživatelského rozhraní (end-to-end testům). A naopak v jakých situacích by to byla asi zbytečná práce.
Také popíši, jak vypadá náš rutinní proces psaní funkčních Selenium testů v Jobs.cz a ukáži několik nástrojů převážně (ale nejenom) pro PHP, které můžete při vytváření a spouštění funkčních testů v praxi využít a které vám celou práci mohou usnadnit.
Automatické testování webů v praxi - Barcamp Ostrava 2015Ondřej Machulda
Prezentace z Barcampu Ostrava 5.12.2015. Záznam přednášky: https://www.youtube.com/watch?v=B8GbM_N9CRc
"Nemáte rádi, když chyby na vašem webu hlásí až zákazníci, kterým něco přestalo fungovat? Raději proto novou verzi ručně kontrolujete - proklikáte hlavní stránky, přihlásíte se, odešlete nějaký ten formulář... Pokud jste tohle někdy zažili, zkusím vám ukázat, jak, proč a kdy to dělat chytřeji. A také co nám v LMC pomáhá starat se o kvalitu webů jako Jobs.cz nebo Prace.cz. Automatizace, funkční testy a Selenium to the rescue!"
28. července 2014 jsme začali po částech přepisovat Jobs.cz z interního frameworku do Symfony. Pokud i vy plánujete přepisovat aplikaci do Symfony, mohlo by vás zajímat, co jsme se za uplynulý rok a čtvrt naučili - na čem jsme si vylámali zuby, co bychom znovu udělali jinak a co se nám naopak vyplatilo.
Video: https://www.youtube.com/watch?v=u6PA7EUO0WA
Při práci s databází se musíme poměrně často potýkat s problematikou vícenásobného souběžného přístupu k datům. Prezentace se zabývá touto problematikou, představuje dva mechanismy řešící souběžné transakce: pessimistic a optimistic offline lock. Dále zmiňuje možné problémy každého z těchto přístupů a na závěr vzájemně porovná vhodnost jejich použití v různých případech.
Autoři: Luboš Krčál, Ondřej Machulda - ČVUT FEL
Hlavní problémy systému on-line rezervace vstupenek do O2 ArenyOndřej Machulda
Prezentace testování webového systému pro on-line rezervace vstupenek v O2 aréně. Ukázka a popis hlavních nalezených problémů včetně doporučení. Kompletní zpráva viz http://www.slideshare.net/ondram/tur-a2-machuon1 .
Testování systému pro on-line rezervaci vstupenek do O2 ArenyOndřej Machulda
Testování uživatelského rozhraní webového systému pro on-line rezervaci vstupenek do O2 Areny v Praze -
semestrální práce předmětu Y39TUR (A7B39TUR) na ČVUT FEL.
Testování jednotlivých případů užití heuristickou evaluací a kognitivním průchodem, popis nalezených problémů včetně doporučení jak je odstranit.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
3. Source: http://shop.toddmclellan.com/product/disassembled-bike
UNIT TESTS FOR EVERYTHING!
But we usually do test the machine disassembled on smallest piceses. Why? Becase it is easy to test
them - you can easily define their behavior and you can usually easily and fast validate it! Like
inputs/outputs of method and its beavior in edge cases. However, this it not always enough...
4. Functional system testing
(„end-to-end tests“ / „UI tests“)
Source: http://www.gianlucagimini.it/prototypes/velocipedia.html, author Gianluca Gimini
If you want to make sure the assembled machine works and everything fits together (eg. you can really
drive & steew the bike), you will test the main business critical scenarios from customer point of view.
Thats why these kind of tests is unreplaceable – its your output quality control. Next one in the QA
chain is usually only the customer, and thats too late :-).
5. Test pyramid
5 %
15 %
80 %
Test pyramid is a visual guide showing how much time you should be investing in which layer of tests. Why
approx. this ratio? The higher layer, the harder is to write and maintain the tests and the slower feedback you
have from them. Unit-tests are fast to write and run, stable and helps with code design – so as a developer
you want to primary write them. But remember the bicycle – you could miss a lot without functional tests.
6. (WebDriver)
The tool you need is Selenium -
open-source library for browser
automation. You tell it what
actions in browser should be
done and it executes them. The
WebDriver protcol is also W3C
draft standard and it is
implemented in almost all
browsers.
7. Start Selenium server
$ docker run -p 4444:4444 selenium/standalone-firefox-debug
OR
$ java -jar selenium-server-standalone-3.3.1.jar &
localhost:4444
Selenium requires practically zero-config installation. You may start it using Docker or local jar file.
Using any of the examples above will start Selenium server listening on port 4444.
8. Selenium server is platform and language independent (it just listens on the port), and
there is a lot of libraries for many languages – inlcuding PHP. There are also multiple ways
how to run tests in PHP, however we wanted to use PHPUnit, because we are already using
it for our unit tests. And besides a different domain languguage the other tools (like
Codeception, Behat...) has, we were also missing some key features we needed.
9. Install Steward
$ mkdir selenium-tests
$ composer require lmc-eu/steward
PHPUnit + facebook/php-webdriver =
So here comes Steward, an open-source tool built on top of PHPUnit and Symfony components. It is a
test-runner (controlled from CLI) and also extension for PHPUnit, integrating the php-webdriver
library. The installation is quite easy, actually, nothing else is needed to start writing tests.
https://github.com/lmc-eu/steward
10. <?php
namespace My;
use LmcStewardTestAbstractTestCase;
class GithubSearchTest extends AbstractTestCase
{
public function testShouldSubmitSearchFromHeaderAndShowResults()
{
$this->wd->get('https://github.com/');
$searchInput = $this->findByCss('.header-search-input');
$searchInput->sendKeys('symfony')
->submit();
$this->waitForTitle('Search · symfony · GitHub');
$firstItem = $this->findByCss('ul h3 a');
$this->assertSame('symfony/symfony', $firstItem->getText());
$firstItem->click();
$this->waitForTitle('GitHub - symfony/symfony: The Symfony PHP framework');
$headerText = $this->findByCss('h1')->getText();
$this->assertSame('symfony/symfony', $headerText);
}
}
Here you can see some examples of what Selenium is capable of: load URL, locate elements, write to
inputs, read meta titles, read text from elements, click on element etc. And even more complex actions
like chaning the browser window size, executing javascript, navigating back in the history and so on.
11. Live Demo
Repository with examples:
https://github.com/OndraM/steward-bephpug
Clone the GitHub repository and run the tests like this:
$ cd selenium-tests
$ ./vendor/bin/steward run prod firefox -vv
See the repository for more description and more examples how to start the test execution.
12. Parallelization
While unit-tests are executed in a matter of seconds, functional tests can take minutes or even more.
To keep their execution time somehow reasonable, you have to parallelize and run multiple tests at
once – what is one of the features Steward provides.
13. Error reporting
When some test fails, Steward gathers PNG screenshot from the browser and also saves HTML
snapshot of the DOM state of the webpage, so you can debug it later. It also provides results overview
of the test execution progress – using generated webpage or CLI command.
14. Example of results.xml file as seen in browser. The test status is generated and updated during the
whole run, so you can also watch the progress here.
15. Example output of `steward results` command – this is CLI equivalent of the reports.xml file.
16. Page Object Pattern
Page Object is a design pattern from Martin Fowler, which suggest interacting with the webpage UI
through an abstraction – ie. an object with methods mapping the UI structure and UI interactions.
Because in the tests scenario you want to interact with the UI, not with its HTML implementation.
Page objects are also a way how to make your functional tests maintainable in a long-term.
17. <?php
namespace My;
use LmcStewardTestAbstractTestCase;
class GithubSearchTest extends AbstractTestCase
{
public function testShouldSubmitSearchFromHeaderAndShowResults()
{
$this->wd->get('https://github.com/');
$searchInput = $this->findByCss('.header-search-input');
$searchInput->sendKeys('symfony')
->submit();
$this->waitForTitle('Search · symfony · GitHub');
$firstItem = $this->findByCss('ul h3 a');
$this->assertSame('symfony/symfony', $firstItem->getText());
$firstItem->click();
$this->waitForTitle('GitHub - symfony/symfony: The Symfony PHP framework');
$headerText = $this->findByCss('h1')->getText();
$this->assertSame('symfony/symfony', $headerText);
}
}
This is the original test as shown before, without using page objects.
Source code of the file on GitHub
18. <?php
namespace My;
use LmcStewardTestAbstractTestCase;
class GithubSearchUsingPageObjectTest extends AbstractTestCase
{
public function testShouldSubmitSearchFormAndShowSearchResults()
{
$this->wd->get('https://github.com/');
$navigationPanel = new NavigationPanel($this);
$searchResultsPanel = $navigationPanel->submitSearchWithQuery('symfony');
$foundItems = $searchResultsPanel->getFoundItems();
$this->assertSame('symfony/symfony', $foundItems[0]);
$projectDetail = $searchResultsPanel->openResultOnIndex(0);
$projectDetailHeader = $projectDetail->getHeader();
$this->assertSame('symfony/symfony', $projectDetailHeader);
}
}
This is the same test case scenario, but rewritten to use page objects.
Source code of the file on GitHub
19. <?php
namespace MyPanelGithub;
use LmcStewardComponentAbstractComponent;
class NavigationPanel extends AbstractComponent
{
const SEARCH_INPUT_SELECTOR = '.header-search-input';
/**
* @param string $query
* @return SearchResultsPanel
*/
public function submitSearchWithQuery($query)
{
$this->findByCss(self::SEARCH_INPUT_SELECTOR)
->sendKeys($query)
->submit();
$this->waitForTitle('Search · ' . $query . ' · GitHub');
return new SearchResultsPanel($this->tc);
}
}
An example of NavigationPanel page object.
Source code of the file on GitHub
20. Continuous integration
&
Continuous deployment
Functional tests are also a necessary part of continuous integration and should not be missing in your
continuous deployment pipeline. As you know – the faster you find your bugs, the faster and cheaper
is to fix them!
21. Summary
Not everything could be covered by unit tests
Test pyramid should not be missing its top
Functional tests may help you sleep better
It is easy to start!
Selenium & Steward
Continuous integration & deployment