Test Driven Development (TDD) involves writing tests before writing code to ensure features work as intended. The document discusses:
1. The TDD process of writing a failing test, writing code to pass the test, and refactoring code and rerunning tests.
2. Benefits of TDD like detecting defects early, code that works as intended, and tests as documentation.
3. EcomDev_PHPUnit, a library that makes it easy to write isolated, data-driven, and integration tests for Magento modules.
4. Examples of different types of tests like models, controllers, layouts, configurations, and more.
Caching is one of the most popular ways to optimize the performance of web applications. Magento is not far from this trend and the primary approach to speed up slow code from the core team is to cache it. This approach works well for small projects where the rate of inventory changes is shallow. But as soon as you enter sales season or receive regular product updates from the external system, your cache hit ratio plummets. In this talk, you will learn how to ensure that your system’s uncached response times are as light as possible when you get a cache miss by minimizing the I/O of your application with intelligent batch data preloading.
Fixing Magento Core for Better Performance - Ivan ChepurnyiMeet Magento Spain
The performance optimization of Magento webshop, it is not only writing your module in the clean way, it is also optimization of core code.
During the session, you will learn how to deal with optimization of most common Magento bottlenecks at catalog, shopping cart and checkout pages.
Processing more than 10 orders per second, serving category, product and checkout pages within 800 milliseconds (and even less) without front cache is possible.
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceIvan Chepurnyi
It is a pity, but I have to admit, that Magento 2 has issues in layout generation process. You'll learn during the talk about the benefits of compiling XML structures into PHP code, and even use the compilation of PHP code into PHP code to speed up your modules complex logic.
This presentation was delivered in the technical track of the break out sessions at Magento's Imagine eCommerce Conference, held on February 7-9, 2011 in Los Angeles.
Caching is one of the most popular ways to optimize the performance of web applications. Magento is not far from this trend and the primary approach to speed up slow code from the core team is to cache it. This approach works well for small projects where the rate of inventory changes is shallow. But as soon as you enter sales season or receive regular product updates from the external system, your cache hit ratio plummets. In this talk, you will learn how to ensure that your system’s uncached response times are as light as possible when you get a cache miss by minimizing the I/O of your application with intelligent batch data preloading.
Fixing Magento Core for Better Performance - Ivan ChepurnyiMeet Magento Spain
The performance optimization of Magento webshop, it is not only writing your module in the clean way, it is also optimization of core code.
During the session, you will learn how to deal with optimization of most common Magento bottlenecks at catalog, shopping cart and checkout pages.
Processing more than 10 orders per second, serving category, product and checkout pages within 800 milliseconds (and even less) without front cache is possible.
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceIvan Chepurnyi
It is a pity, but I have to admit, that Magento 2 has issues in layout generation process. You'll learn during the talk about the benefits of compiling XML structures into PHP code, and even use the compilation of PHP code into PHP code to speed up your modules complex logic.
This presentation was delivered in the technical track of the break out sessions at Magento's Imagine eCommerce Conference, held on February 7-9, 2011 in Los Angeles.
s React.js a library or a framework? In any case, it is a new way of working that represents a revolution in the way of building web projects. It has very particular characteristics that allow us, for instance, to render React code from the server side, or to include React components from Twig tags. During this talk we will present React.js, we will explore how to take advantage of it from PHP projects and we will give answers to practical problems such as universal (isomorphical) rendering and the generation of React.js forms from Symfony forms without duplication of efforts.
Building a Pyramid: Symfony Testing StrategiesCiaranMcNulty
The last few years have seen a huge adoption of testing practices, and an explosion of different testing tools, in the PHP space. The difficulties come when we have to choose which tools to use, in what combinations, and how to apply them to existing codebases.
In this talk we will look at what tools are available, what their strengths are, how to decide which set of tools to use for new or legacy projects, and when to prioritise decoupling and testability over the convenience we get from our frameworks.
Caching and Scaling WordPress using Fragment CachingErick Hitter
Using what I’ve learned working on the WordPress.com VIP platform, this presentation discusses caching techniques applicable to WordPress installations of almost any size.
Presented February 18, 2012 at WordCamp Miami.
Original HTML5 slides are available at http://www.ethitter.com/2012/02/caching-and-scaling-wcmia/.
https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes - origin
Laravel 5.1 raised the bar for framework documentation, but there's much, much more lurking beneath the surface. In this 50-minute session, we'll explore 50 (yes, 50!) high-leverage implementation tips & tricks that you just won't find in the docs: the IoC Container, Blade, Eloquent, Middleware, Routing, Commands, Queues, Events, Caching — we'll cover them all! Join us as we drink from the fire hose & learn to take advantage of everything that Laravel has to offer to build better software faster!
In 2010, I told everyone how to start unit testing Zend Framework applications. In 2011, let’s take this a step further by testing services, work flows and performance. Looking to raise the bar on quality? Let this talk be the push you need to improve your Zend Framework projects.
Watch Erik's presentation on PHP Unit Testing to gain familiarity with unit tests and unit testing here at Tagged, with the testing framework currently in place and also learn how to write (better) unit tests. Download his slides here or email him at ejohannessen@tagged.com.
s React.js a library or a framework? In any case, it is a new way of working that represents a revolution in the way of building web projects. It has very particular characteristics that allow us, for instance, to render React code from the server side, or to include React components from Twig tags. During this talk we will present React.js, we will explore how to take advantage of it from PHP projects and we will give answers to practical problems such as universal (isomorphical) rendering and the generation of React.js forms from Symfony forms without duplication of efforts.
Building a Pyramid: Symfony Testing StrategiesCiaranMcNulty
The last few years have seen a huge adoption of testing practices, and an explosion of different testing tools, in the PHP space. The difficulties come when we have to choose which tools to use, in what combinations, and how to apply them to existing codebases.
In this talk we will look at what tools are available, what their strengths are, how to decide which set of tools to use for new or legacy projects, and when to prioritise decoupling and testability over the convenience we get from our frameworks.
Caching and Scaling WordPress using Fragment CachingErick Hitter
Using what I’ve learned working on the WordPress.com VIP platform, this presentation discusses caching techniques applicable to WordPress installations of almost any size.
Presented February 18, 2012 at WordCamp Miami.
Original HTML5 slides are available at http://www.ethitter.com/2012/02/caching-and-scaling-wcmia/.
https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes - origin
Laravel 5.1 raised the bar for framework documentation, but there's much, much more lurking beneath the surface. In this 50-minute session, we'll explore 50 (yes, 50!) high-leverage implementation tips & tricks that you just won't find in the docs: the IoC Container, Blade, Eloquent, Middleware, Routing, Commands, Queues, Events, Caching — we'll cover them all! Join us as we drink from the fire hose & learn to take advantage of everything that Laravel has to offer to build better software faster!
In 2010, I told everyone how to start unit testing Zend Framework applications. In 2011, let’s take this a step further by testing services, work flows and performance. Looking to raise the bar on quality? Let this talk be the push you need to improve your Zend Framework projects.
Watch Erik's presentation on PHP Unit Testing to gain familiarity with unit tests and unit testing here at Tagged, with the testing framework currently in place and also learn how to write (better) unit tests. Download his slides here or email him at ejohannessen@tagged.com.
From typing the test to testing the typeWim Godden
PHP unit testing + new PHPUnit patch for type testing functionality
Seems bullet points are not working and some of the slides are not so clear because of Slideshare conversion.
Presentation given at phpBenelux meeting August 25, 2010
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.
Explored various java-script test-runners, which are capable of supporting JS tests on major browsers, of which JS-Test-Driver stands the most promising...
Learn how to write scripted load tests in PHP to run against your system without breaking the bank. Jason will cover not only the importance of load testing, but share stories of how load tests uncovered problems that would otherwise not have been discovered until production. Also, learn how to use load testing to learn how to deal with large traffic sites without needing to be employed by a large scale site first. We’ll be using RedLine13, an almost free load testing tool that is at the same time inexpensive, easy, and effective.
n 2010, I told everyone how to start unit testing Zend Framework applications. In 2011, let’s take this a step further by testing services, work flows and performance. Looking to raise the bar on quality? Let this talk be the push you need to improve your Zend Framework projects.
Deployments are one of the most important parts of any project. Yet in my experience deploying is one of the most dreaded parts of a project. Early starts, Rollbacks stress and joy. However deploying should not be like this. Continuous delivery and deployments are nothing new but they do take a shift in how we think as developers both from the infrastructure aspect and revisions in code. During this talk I will take you through my journey of continuous delivery with E-Commerce applications where we deploy several times a day, use feature toggles to hide functionality and how we handle git in an ever deployable environment.
This talk will take you through a history of how I previously handled PHP deployments highlighting the areas I wanted improving, Speed to deploy, Ease of deployment, Experimentation and agility. We will then learn more about CD with feature branching and feature toggles and what the infrastructure looks like for PHP projects wanting to take advantage of this. My hope is that people will leave the room with enough knowledge to explore there own deployment process and how they can leverage parts of CD to aid in there workflow.
Similar to Using of TDD practices for Magento (20)
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
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.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
How world-class product teams are winning in the AI era by CEO and Founder, P...
Using of TDD practices for Magento
1. Using of Test Driven DevelopmentPractices for Magento Ivan Chepurnyi Magento Trainer / Lead Developer
2. Short Overview Meet Magento Netherlands Write a test Imaging how your feature should work and write a failing test Write feature quickly for receiving passed test Refactor your code and run the test again Pass Run the tests Fail Pass Write the code Fail Run the tests
3. Conventional Development Meet Magento Netherlands You need to write a full functionality for seeing the result You think that your code works Debugging With every fixed issue you may produce a new one Even if you write unit tests after implementation it doesn’t guarantee that you detect the defect.
4. Test Driven Development Meet Magento Netherlands You don’t need to implement full functionality for seeing the result Your colleagues can use your test as learning material The test proofs that your code works and can be verified Serious defects can be fixed on early state
5. Defect Costs Meet Magento Netherlands Percentage from project development hours < 1% 20% > 40% Defect found at the coding stage Defect found during QA phase Defect found after going live
6. Type of Tests Meet Magento Netherlands Automated Test Regression Test Learning Test Integration Test
7. Meet Magento Netherlands Test in Isolation Make test simple Test erroneous situations Test Doubles (Fake heavy resources you don’t depend on) Main Principles
8. EcomDev_PHPUnit Meet Magento Netherlands Making possible isolation of your test Easy test data loading via Yaml fixtures Data providers and expectations for reusable tests Easy way of testing configuration files Easy way for Layouts & Controllers integration test
9. Simple Test Case Meet Magento Netherlands class EcomDev_Example_Test_Model_Productextends EcomDev_PHPUnit_Test_Case { /** * @test * @loadFixture * @dataProviderdataProvider */ public function priceCalculation($productId, $storeId) { $storeId = Mage::app()->getStore($storeId)->getId(); $product = Mage::getModel('catalog/product') ->setStoreId($storeId) ->load($productId); $expected = $this->expected('%s-%s', $productId, $storeId); $this->assertEquals($expected->getFinalPrice(), $product->getFinalPrice()); $this->assertEquals($expected->getPrice(), $product->getPrice()); } } Test Case Class
10. Simple Test Case Meet Magento Netherlands eav: catalog_product: - entity_id: 1 type_id: simple sku: book website_ids: - usa_website - canada_website price: 12.99 status: 1 # Enabled visibility: 4 # Visible in Catalog & Search /websites: # Set different prices per website usa_website: special_price: 9.99 german_website: price: 9.99 special_price: 5.99 Yaml Fixture
12. Event Dispatch Check Meet Magento Netherlands class EcomDev_Example_Test_Model_Cms_Pageextends EcomDev_PHPUnit_Test_Case { // … public function testAvailableStatuses() { Mage::getModel(‘cms/page’)->getAvailableStatuses(); $this->assertEventDispatched( ‘cms_page_get_available_statuses’ ); } } Test Case
13. Test Doubles Meet Magento Netherlands class EcomDev_PHPUnit_Tes_Case_Controllerextends EcomDev_PHPUnit_Test_Case { protected function registerCookieStub() { $cookie = $this->getModelMock('core/cookie', array('set', 'delete')); $cookie->expects($this->any()) ->method('set') ->will($this->returnCallback(array($this, 'setCookieCallback‘))); $cookie->expects($this->any()) ->method('delete‘) ->will($this->returnCallback(array($this, 'deleteCookieCallback‘))); $this->replaceByMock('singleton', 'core/cookie', $cookie); return $this; } } Test Case
14. Config Test Case Meet Magento Netherlands class EcomDev_Example_Test_Config_Main extends EcomDev_PHPUnit_Test_Case_Config { //…. public function testModuleVersion() { $this->assertModuleCodePool('local'); $this->assertModuleDepends(‘Mage_Catalog’); $this->assertModuleVersionGreaterThan(‘0.1.0'); } } Testing Module Nodes
15. Config Test Case Meet Magento Netherlands class EcomDev_Example_Test_Config_Main extends EcomDev_PHPUnit_Test_Case_Config { //…. public function testClassAliasDefinitions() { $this->assertModelAlias('catalog/product', 'Mage_Catalog_Model_Product'); $this->assertResourceModelAlias( 'catalog/product', ‘Mage_Catalog_Model_Resource_Eav_Mysql4_Product‘ ); $this->assertBlockAlias( 'catalog/product_list', 'Mage_Catalog_Block_Product_List‘ ); } } Testing Class Aliases
16. Config Test Case Meet Magento Netherlands class EcomDev_Example_Test_Config_Main extends EcomDev_PHPUnit_Test_Case_Config { //…. public function testEventObservers() { $this->assertEventObserverDefined( 'frontend', 'customer_login', 'catalog/product_compare_item', 'bindCustomerLogin' ); } } Testing Event Observer Definitions
17. Controller Test Case Meet Magento Netherlands class EcomDev_Example_Test_Controller_Main extends EcomDev_PHPUnit_Test_Case_Controller { public function testRequest() { $this->dispatch('cms'); $this->assertRequestDispatched(); $this->assertRequestNotForwarded(); $this->assertRequestRoute('cms/index/index'); $this->assertRequestRouteName('cms'); $this->assertRequestControllerName('index'); $this->assertRequestControllerModule('Mage_Cms'); $this->assertRequestActionName('index'); } } Testing Request
18. Controller Test Case Meet Magento Netherlands class EcomDev_Example_Test_Controller_Main extends EcomDev_PHPUnit_Test_Case_Controller { public function testLayout() { $this->dispatch(''); $this->assertLayoutHandleLoaded('cms_index_index'); $this->assertLayoutBlockCreated('right'); $this->assertLayoutBlockRendered('content'); $this->assertLayoutBlockActionNotInvoked( 'footer_links', 'addLink', '', array('Custom Title') ); $this->assertLayoutBlockActionInvokedAtLeast( 'footer_links', 'addLink', 4, '‘ ); } } Testing Layouts
19. What’s Next Meet Magento Netherlands Write automated tests for your moduleshttp://www.magentocommerce.com/magento-connect/Ecommerce%20Developers/extension/5717/ecomdev_phpunit Keep project healthy during its lifecycle with Continuous Integration Running Daily Builds Running Unit Tests in 10 minutes after last commit Hudson http://hudson-ci.org phpUnderControlhttp://phpundercontrol.org/