This presentation is a preparation for PHP Test Fest 2009 (http://qa.php.net/testfest). See your local PHP user group for details of this world wide event.
"TCP Input Text" implements the Google SOAP Search API and Bing API v2 to extract TCP Ports and Fully Qualified Domain Names (FQDN) from Google Search Results into a .csv file and individual shell scripts for maltego, nmap and nc aka netcat to provide assurance of a listening TCP service since the time that has past of the last crawl performed by the GoogleBot and BingBot
"TCP Input Text" implements the Google SOAP Search API and Bing API v2 to extract TCP Ports and Fully Qualified Domain Names (FQDN) from Google Search Results into a .csv file and individual shell scripts for maltego, nmap and nc aka netcat to provide assurance of a listening TCP service since the time that has past of the last crawl performed by the GoogleBot and BingBot
Trust, but verify | Testing with Docker ContainersNan Liu
This presentation will dive into testing with Docker Containers
* Building Docker containers and testing with Serverspec
* Testing Docker Compose with Serverspec
* Taking advantage of Docker sibling containers to run serverspec in a container
* Running large test matrix with Serverspec
* Demonstrate using pry/pry-rescue to debug large test
The lab is available at: https://github.com/nanliu/docker-serverspec
Visual studio is the one shop stop for most .NET developers; it’s a shame since there are other powerful tools out there.
WinDbg is such a tool – it can help analyze and solve bugs, memory issues, deadlocks and is crucial to solving bugs that are found on the client machines.
The problem is that WinDbg is not as friendly as Visual Studio (to say the least) – or is it?
In this talk I’ll show how a .NET developer can use WinDbg to crash bugs.
When migrating, we often need to review old code and target only interesting issues. This session will connect the backward incompatibilities and new features to actual location in the code, relying on static analysis to process a large code base quickly. Based on the accumulated experience of the tools, we will review the issues, diagnose criticality, select the best fixes, and prioritize tasks. All tools used will be open source, and you can try them at home for more validation.
make is a basic tool to define pipelines of shell commands.
It is useful if you have many shell scripts and commands, and you want to organize them.
Even if it has been written to automatize the build of compiled language programs, make is also useful in bioinformatics and other fields.
When Good Code Goes Bad: Tools and Techniques for Troubleshooting PloneDavid Glick
Using real issues encountered in the wild, this session will help beginning integrators gain confidence in knowing what to do when Plone fails to behave as expected. Learn how to solve common problems like "My changes aren't taking effect" and "My Zope instance won't start," as well as how to use pdb to investigate more complex Python errors.
This talk is targeted at integrators who have some experience with Plone, but who are not confident in troubleshooting errors and other unexpected behavior. Knowledge of Python is not required, though at least a cursory familiarity with some programming language will make the talk more digestible.
Linux Kernel, tested by the Linux-version of PVS-StudioPVS-Studio
Since the release of the publicly available Linux-version of PVS-Studio, it was just a matter of time until we would recheck the Linux kernel. It is quite a challenge for any static code analyzer to check a project written by professionals from all around the world, used by people in various fields, which is regularly checked and tested by different tools. So, what errors did we manage to find in such conditions?
When developing symfony plugins for use and reuse in your projects and maybe (hopefully) by the symfony community you want to make sure that a new release doesn't break with backwards compatibility. While symfony comes with lime the de facto standard for unit testing in PHP is PHPUnit and it offers much more. This session will show you some of the best practices of testing symfony plugins. You will learn how to organise your tests and how to reduce your dependencies to the bare essentials.
PHP isn't only used as a web-based scripting language, it can also be used on the command line.
This talks explains the benefits of command line PHP. Additionally, process control using CLI PHP is explained.
Trust, but verify | Testing with Docker ContainersNan Liu
This presentation will dive into testing with Docker Containers
* Building Docker containers and testing with Serverspec
* Testing Docker Compose with Serverspec
* Taking advantage of Docker sibling containers to run serverspec in a container
* Running large test matrix with Serverspec
* Demonstrate using pry/pry-rescue to debug large test
The lab is available at: https://github.com/nanliu/docker-serverspec
Visual studio is the one shop stop for most .NET developers; it’s a shame since there are other powerful tools out there.
WinDbg is such a tool – it can help analyze and solve bugs, memory issues, deadlocks and is crucial to solving bugs that are found on the client machines.
The problem is that WinDbg is not as friendly as Visual Studio (to say the least) – or is it?
In this talk I’ll show how a .NET developer can use WinDbg to crash bugs.
When migrating, we often need to review old code and target only interesting issues. This session will connect the backward incompatibilities and new features to actual location in the code, relying on static analysis to process a large code base quickly. Based on the accumulated experience of the tools, we will review the issues, diagnose criticality, select the best fixes, and prioritize tasks. All tools used will be open source, and you can try them at home for more validation.
make is a basic tool to define pipelines of shell commands.
It is useful if you have many shell scripts and commands, and you want to organize them.
Even if it has been written to automatize the build of compiled language programs, make is also useful in bioinformatics and other fields.
When Good Code Goes Bad: Tools and Techniques for Troubleshooting PloneDavid Glick
Using real issues encountered in the wild, this session will help beginning integrators gain confidence in knowing what to do when Plone fails to behave as expected. Learn how to solve common problems like "My changes aren't taking effect" and "My Zope instance won't start," as well as how to use pdb to investigate more complex Python errors.
This talk is targeted at integrators who have some experience with Plone, but who are not confident in troubleshooting errors and other unexpected behavior. Knowledge of Python is not required, though at least a cursory familiarity with some programming language will make the talk more digestible.
Linux Kernel, tested by the Linux-version of PVS-StudioPVS-Studio
Since the release of the publicly available Linux-version of PVS-Studio, it was just a matter of time until we would recheck the Linux kernel. It is quite a challenge for any static code analyzer to check a project written by professionals from all around the world, used by people in various fields, which is regularly checked and tested by different tools. So, what errors did we manage to find in such conditions?
When developing symfony plugins for use and reuse in your projects and maybe (hopefully) by the symfony community you want to make sure that a new release doesn't break with backwards compatibility. While symfony comes with lime the de facto standard for unit testing in PHP is PHPUnit and it offers much more. This session will show you some of the best practices of testing symfony plugins. You will learn how to organise your tests and how to reduce your dependencies to the bare essentials.
PHP isn't only used as a web-based scripting language, it can also be used on the command line.
This talks explains the benefits of command line PHP. Additionally, process control using CLI PHP is explained.
A few tips on how to go to the next level in PHP web application development. Tells about SCM, code convention, code testing, DRY, etc. Targeted towards the new PHPers who have worked for around 6-12 months.
The why and how of moving to PHP 5.5/5.6Wim Godden
With PHP 5.6 out and many production environments still running 5.2 or 5.3, it's time to paint a clear picture on why everyone should move to 5.5 and 5.6 and how to get code ready for the latest version of PHP. In this talk, we'll look at some handy tools and techniques to ease the migration.
Automatic testing and quality assurance for WordPress plugins and themesOtto Kekäläinen
Talk given at WP Helsinki Meetup 7.11.2018
See also:
* https://developer.wordpress.org/themes
* https://developer.wordpress.org/plugins
* https://travis-ci.org/Seravo
* https://seravo.com/blog/coding-wordpress-in-style-with-phpcs/
Practical tips for dealing with projects involving legacy code. Covers investigating past projects, static analysis of existing code, and methods for changing legacy code.
Presented at PHP Benelux '10
Apache and PHP: Why httpd.conf is your new BFF!Jeff Jones
Apache's configuration files can be used to configure how Apache operates, but they can also be used to configure PHP and how Apache httpd interacts with PHP. In this talk, Jeff explains the different ways Apache can be configured, explains many of the useful config options available for Apache modules, including our own mod_php, and showcases example of how they can be used with, and instead of, your PHP code.
PHP7 brings a tremendous number of new features. Tonight, we will take a look at the null coalesce operator, new execution order (uniform variable syntax), new exceptions and more.
1. Preparing for
PHP TestFest 2009
by Felix De Vliegher and Michelangelo van Dam
2. Welcome to PHP Test Fest 2009 !
• What is PHP Test Fest ?
– improving code coverage of the PHP interpreter by
writing tests
– opportunity to learn how to write tests in a group/
workshop like environment
– your chance to contribute back to the PHP
community !
2
3. Prerequisites
• preferable a Linux version
– virtual machine
– core OS
• with gcc and gcov (see next slide for details)
• for testing coverages
– gcov
– lcov (version 1.5 or 1.6)
• php 5.3
– from CVS (see next slide)
• text editor like vi(m), textpad, pico, ...
3
6. Getting the latest PHP 5.3
Choose a development environment
$ cd ~/src/php/
$ cvs -d :pserver:cvsread@cvs.php.net:/repository checkout -
r PHP_5_3 php5
$ cd php5
Build a configure for your current version
$ ./buildconf
Run the configuration
$ ./configure --enable-gcov
choose --enable-gcov for code coverage reporting
make & make test & make lcov
$ make
$ make test
$ make lcov TESTS=tests/*
6
8. Writing Tests
• What are phpt Tests ?
Files ending with .phpt are test files
containing a single test
• What skills do I need to write phpt tests ?
– basic knowledge of PHP
– a text editor like vi(m), pico, notepad, textpad, ...
– a way to get results of your test code
• Where can I find more info about phpt ?
http://phpt.info
8
9. Naming conventions
• Tests for bugs
– bug<bugid>.phpt (bug17123.phpt)
• Tests for a function’s basic behaviour
– <functionname>_basic.phpt (dba_open_basic.phpt)
• Tests for a function’s error behaviour
– <functionname>_error.phpt (dba_open_error.phpt)
• Tests for variations in a function’s behaviour
– <functionname>_variation.phpt (dba_open_variation.phpt)
• General tests for extensions
– <extname>_<no>.phpt (dba_003.phpt)
9
13. Testing Errors with expectregex
--TEST--
Hello World
--FILE--
<?php echo ‘Hello World
--EXPECTREGEX--
Parse Error: (parse|syntax) error, unexpected $end in .*
ON .*
13
16. Don’t forget the credits
--TEST--
A test with a CREDITS section
--CREDITS--
John Doe <john.doe@example.com>
#testfest PHPBelgium 2009-05-09
--FILE--
--EXPECT--
16
18. Resources
• TestFest
http://qa.php.net/testfest.php
• PHP Quality Assurance Team
http://qa.php.net/
• PHP: Test and Code Coverage Analysis
http://gcov.php.net/
• Complete ./configure example
http://gcov.php.net/viewer.php?
version=PHP_5_3&func=system
18
19. Let PHP Test Fest begin !
Thank you for your interest !
Your work will be appreciated !!!
Slides are available on
http://www.slideshare.net/PHPBelgium
19