The document discusses test-driven development for TYPO3 and describes how to use unit testing and the testing framework in TYPO3. It covers key testing concepts like test cases, assertions, and test suites. It also provides an overview of the testing lifecycle and recommends a test-first development approach. Finally, it demonstrates how the testing framework can be used to fake different parts of TYPO3 like records, relations, pages, and frontend users.
JUnit is the de facto standard in Java testing. Yet many advanced JUnit features are little known and poorly understood. This session reviews some lesser-known features of JUnit, along with a few associated libraries, that can make your unit tests more powerful, expressive, and fun. The session is intended for Java developers, lead developers, and architects trying to introduce good testing practices into their teams.
Unit testing with PHPUnit - there's life outside of TDDPaweł Michalik
Basics of PHPUnit and why is it even more relevant in legacy code. Key points of the framework are explained, along with mocking objects, test organisation, creating documentations with tests and accessing non-public objects (where applicable).
Live version with additional notes available at: http://pawelmichalik.net/presentations/unit-testing-with-phpunit?showNotes=true
Prezentacja dostępna także w języku polskim: http://pawelmichalik.net/prezentacje/testy-jednostkowe-w-phpunit?showNotes=true
Unit testing, everyone talks about it and wants to do it but never gets around to actually start testing. Complex spaghetti code and time / budget pressures are often the reasons why nobody dives in and gets started with testing. But when the application breaks, and people loose money or worse it's often too late.
In this talk I will take you on a journey with real examples that will show you how you can set up your tests, how to test complex situations with legacy spaghetti code, test web services, database interactions and how to gradually build a solid foundation to safeguard the core code base and everything around it.
Don't you want to be confident when you walk out the office?
JUnit is the de facto standard in Java testing. Yet many advanced JUnit features are little known and poorly understood. This session reviews some lesser-known features of JUnit, along with a few associated libraries, that can make your unit tests more powerful, expressive, and fun. The session is intended for Java developers, lead developers, and architects trying to introduce good testing practices into their teams.
Unit testing with PHPUnit - there's life outside of TDDPaweł Michalik
Basics of PHPUnit and why is it even more relevant in legacy code. Key points of the framework are explained, along with mocking objects, test organisation, creating documentations with tests and accessing non-public objects (where applicable).
Live version with additional notes available at: http://pawelmichalik.net/presentations/unit-testing-with-phpunit?showNotes=true
Prezentacja dostępna także w języku polskim: http://pawelmichalik.net/prezentacje/testy-jednostkowe-w-phpunit?showNotes=true
Unit testing, everyone talks about it and wants to do it but never gets around to actually start testing. Complex spaghetti code and time / budget pressures are often the reasons why nobody dives in and gets started with testing. But when the application breaks, and people loose money or worse it's often too late.
In this talk I will take you on a journey with real examples that will show you how you can set up your tests, how to test complex situations with legacy spaghetti code, test web services, database interactions and how to gradually build a solid foundation to safeguard the core code base and everything around it.
Don't you want to be confident when you walk out the office?
Fighting Fear-Driven-Development With PHPUnitJames Fuller
This talk was designed for PHP developers with limited or no experience in unit testing. I focus on describing the problem of fear-driven-development, and how test-driven-development can be used to improve the quality of your code.
Talk given in French at ConFoo 2015
Le TDD (Test Driven Development) gagne en popularité dans la communauté PHP. C’est maintenant une pratique accepté. Mais commencer peut sembler difficile.
Dans cette session, nous allons voir ce qu’est le TDD. Nous allons commencer par voir les principes. Puis les outils utilisés, et comment s’en servir au quotidien. Nous allons aussi voir les difficultés souvent rencontrées et comment les contourner.
In this session the current automated testing infrastructure of the Joomla CMS is explained:
theory of system- & unit-tests
Joomla's unit testing setup
setting up your machine
how to execute the test suite
how to write a test
Joomla's system testing setup
setting up your machine
how to execute the test suite
how Joomla automates the automated tests
A lot of people using PHPunit for testing their source code. While I was observing my team I recognized most of them are only using the standard assertions like 'assertEquals()' and are complaining about how hard it is to test the code even when the tests are written first. This talk is about all the stuff not used on a daily basis and it digs deep into uncommon features of PHPUnit.
A presentation on JUnit Pioneer given at Fortitude Technologies on Mar. 4, 2021. JUnit Pioneer is an extension library for JUnit 5 (Jupiter).
Sample code on GitHub at:
https://github.com/sleberknight/junit-pioneering-presentation-code
JUnit Pioneer home page:
https://junit-pioneer.org
Presentation showing that writing tests is not really hard with examples on testing a simple class, testing with dataproviders, fixtures, mocks, stubs, databases and how to use zend framework bootstrap for MVC testing.
Given at php|tek 09 unconf sessions.
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
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.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
20. The phpunit extension
has it all
phpunit (TYPO3 extension)
PHPUnit (PEAR package)
Testrunner
(back-end-
module)
21. The phpunit extension
has it all
phpunit (TYPO3 extension)
PHPUnit (PEAR package)
Testrunner Testrunner
(back-end-
module) (CLI module)
22. The phpunit extension
has it all
phpunit (TYPO3 extension)
PHPUnit (PEAR package)
Testing framework for FE & DB
Testrunner Testrunner
(back-end-
module) (CLI module)
52. Use meaningful
unit test names
Name the
behavior. classCanBeInstantiated
53. Use meaningful
unit test names
Name the
behavior. classCanBeInstantiated
Mention the
method. setTitleSetsTitle
54. Use meaningful
unit test names
Name the
behavior. classCanBeInstantiated
Mention the
method. setTitleSetsTitle
Name the setSizeWithZeroThrowsException
preconditions. hasTitleForEmptyTitleReturnsFalse
55. Use meaningful
unit test names
Name the
behavior. classCanBeInstantiated
Mention the
method. setTitleSetsTitle
Name the setSizeWithZeroThrowsException
preconditions. hasTitleForEmptyTitleReturnsFalse
Dont‘t use
"works" or
"correctly".
56. Use meaningful
unit test names
Name the
behavior. classCanBeInstantiated
Mention the
method. setTitleSetsTitle
Name the setSizeWithZeroThrowsException
preconditions. hasTitleForEmptyTitleReturnsFalse
Dont‘t use
"works" or measureFrubbleWorksCorrectly
"correctly".
57. Use meaningful
unit test names
Name the
behavior. classCanBeInstantiated
Mention the
method. setTitleSetsTitle
Name the setSizeWithZeroThrowsException
preconditions. hasTitleForEmptyTitleReturnsFalse
Dont‘t use
"works" or measureFrubbleWorksCorrectly
"correctly".
58. The testing framework
is created quickly
/**
* @var Tx_Phpunit_Framework
*/
protected $testingFramework = NULL;
public function setUp() {
$this->testingFramework = new Tx_Phpunit_Framework('tx_news2');
}
public function tearDown() {
$this->testingFramework->cleanUp();
unset($this->testingFramework);
}
59. The testing framework
is created quickly
/**
* @var Tx_Phpunit_Framework
*/
protected $testingFramework = NULL;
public function setUp() {
$this->testingFramework = new Tx_Phpunit_Framework('tx_news2');
}
discard the FE,
public function tearDown() {
delete DB records,
$this->testingFramework->cleanUp();
unset($this->testingFramework);
delete files
}
60. The testing framework
is created quickly
/**
* @var Tx_Phpunit_Framework
*/
protected $testingFramework = NULL;
public function setUp() {
$this->testingFramework = new Tx_Phpunit_Framework('tx_news2');
}
discard the FE,
public function tearDown() {
delete DB records,
$this->testingFramework->cleanUp();
unset($this->testingFramework);
delete files
}
CREATE TABLE tx_news2_domain_model_news (
…
is_dummy_record tinyint(1) unsigned DEFAULT '0' NOT NULL,
…
61. The testing framework
can fake almost everything
62. The testing framework
can fake almost everything
$recordUid = $tf->createRecord($tableName, array $recordData = array());
63. The testing framework
can fake almost everything
$recordUid = $tf->createRecord($tableName, array $recordData = array());
$tf->changeRecord($tableName, $uid, array $recordData);
64. The testing framework
can fake almost everything
$recordUid = $tf->createRecord($tableName, array $recordData = array());
$tf->changeRecord($tableName, $uid, array $recordData);
$tf->deleteRecord($tableName, $uid);
65. The testing framework
can fake almost everything
$recordUid = $tf->createRecord($tableName, array $recordData = array());
$tf->changeRecord($tableName, $uid, array $recordData);
$tf->deleteRecord($tableName, $uid);
$tf->createRelation($tableName, $uidLocal, $uidForeign, $sorting = 0);
85. The testing framework
can fake almost everything
86. The testing framework
can fake almost everything
$recordUid = $tf->createBackEndUser(array $recordData = array());
87. The testing framework
can fake almost everything
$recordUid = $tf->createBackEndUser(array $recordData = array());
$recordUid = $tf->createBackEndUserGroup(array $recordData = array());
88. The testing framework
can fake almost everything
89. The testing framework
can fake almost everything
$path = $tf->createDummyFile($fileName = 'test.txt', $content = '');
90. The testing framework
can fake almost everything
$path = $tf->createDummyFile($fileName = 'test.txt', $content = '');
$path = $tf->createDummyZipArchive($fileName = 'test.zip', array $filesToAdd = array());
91. The testing framework
can fake almost everything
$path = $tf->createDummyFile($fileName = 'test.txt', $content = '');
$path = $tf->createDummyZipArchive($fileName = 'test.zip', array $filesToAdd = array());
$tf->deleteDummyFile($fileName);
92. The testing framework
can fake almost everything
$path = $tf->createDummyFile($fileName = 'test.txt', $content = '');
$path = $tf->createDummyZipArchive($fileName = 'test.zip', array $filesToAdd = array());
$tf->deleteDummyFile($fileName);
$path = $tf->createDummyFolder($folderName);
93. The testing framework
can fake almost everything
$path = $tf->createDummyFile($fileName = 'test.txt', $content = '');
$path = $tf->createDummyZipArchive($fileName = 'test.zip', array $filesToAdd = array());
$tf->deleteDummyFile($fileName);
$path = $tf->createDummyFolder($folderName);
$tf->deleteDummyFolder($folderName);
94. Use vfsStream for creating
fake files and folders
public function setUp {
$root = vfsStream::setUp('Stuff');
$this->moreStuff = vfsStream::newDirectory('moreStuff')->at($root);
}
95. Use vfsStream for creating
fake files and folders
public function setUp {
$root = vfsStream::setUp('Stuff');
$this->moreStuff = vfsStream::newDirectory('moreStuff')->at($root);
}
/**
* @test
*/
public function checkFileWithPathOfExistingNonEmptyFileReturnsTrue() {
$file = vfsStream::createFile('test.txt')->at($this->moreStuff);
$file->withContent('Hello world!');
$this->assertTrue(
$this->fixture->checkFile(vfsStream::url('Stuff/moreStuff/test.txt'))
);
}