1. The talk discusses unit test anti-patterns like the opaque anti-pattern where tests are difficult to understand, and the wet anti-pattern where tests rely too heavily on production code.
2. An example is given of unit tests written for a racing game subsystem that were initially successful but led to slowed progress later on.
3. Techniques to avoid opaque tests are covered, like using descriptive names, separating arrangement from assertion, and avoiding magic literals. The benefits of tests following an arrange-act-assert structure are emphasized.
Given that the database, as the canonical repository of data, is the most important part of many applications, why is it that we don't write database unit tests? This talk promotes the practice of implementing tests to directly test the schema, storage, and functionality of databases.
So you've got testing religion, but the question now is, how do you test your database?
This tutorial introduces pgTAP, a comprehensive, easy-to-use test suite for PostgreSQL. We'll work from getting and installing pgTAP, to writing a simple test, to running the test and integrating it into your test environment. And then we really get into the fun stuff:
Testing scalar values
Testing error conditions and performance regressions
Testing database schemas, including tables, columns, constraints, indexes, triggers, etc.
Testing result sets
Testing procedures
Testing may sound like a dry topic, but my examples aren't! Come join the fun!
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...Victor Rentea
A Pragmatic approach to work with exceptions in Java. Talk recording: https://www.youtube.com/watch?v=LRwCE7GreSM&feature=youtu.be
Discussing checked exceptions, Vavr, Lombok, and JooL library, Spring Framework and many more.
Supporting in-depth article series: https://victorrentea.ro/blog/exception-handling-guide-in-java/
The document discusses Orleankka, which is a functional API for Microsoft Orleans that provides proper support for F# programming. Orleans is a distributed actor framework built by Microsoft Research that uses an actor model for building distributed systems. Orleankka addresses some limitations of Orleans like lack of support for F# and unit testing actors in isolation. It demonstrates concepts of Orleans like grains, silos, and clusters. Examples show how to define and use typed actors in F# with Orleankka's functional API.
Eric Holscher gave a talk on testing in Django at Djangocon 2009. He discussed the state of testing in Django and how it has improved. He encouraged testing applications to ensure code quality and ability to adapt to changes. Holscher provided an overview of different types of tests like doctests, unit tests, and functional tests and tools available for testing. He highlighted goals for continued improvements to testing in Django like test-only models and better test coverage reporting.
Nasal passages allow air to flow into and out of the lungs. Django's built-in testing framework has some pain points such as tests being slow, crowded, and overbroad. Django Nose improves upon Django's testing framework by enabling test discovery, attributes, generators, and XML output to make tests faster, more flexible, and scalable.
Given that the database, as the canonical repository of data, is the most important part of many applications, why is it that we don't write database unit tests? This talk promotes the practice of implementing tests to directly test the schema, storage, and functionality of databases.
So you've got testing religion, but the question now is, how do you test your database?
This tutorial introduces pgTAP, a comprehensive, easy-to-use test suite for PostgreSQL. We'll work from getting and installing pgTAP, to writing a simple test, to running the test and integrating it into your test environment. And then we really get into the fun stuff:
Testing scalar values
Testing error conditions and performance regressions
Testing database schemas, including tables, columns, constraints, indexes, triggers, etc.
Testing result sets
Testing procedures
Testing may sound like a dry topic, but my examples aren't! Come join the fun!
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...Victor Rentea
A Pragmatic approach to work with exceptions in Java. Talk recording: https://www.youtube.com/watch?v=LRwCE7GreSM&feature=youtu.be
Discussing checked exceptions, Vavr, Lombok, and JooL library, Spring Framework and many more.
Supporting in-depth article series: https://victorrentea.ro/blog/exception-handling-guide-in-java/
The document discusses Orleankka, which is a functional API for Microsoft Orleans that provides proper support for F# programming. Orleans is a distributed actor framework built by Microsoft Research that uses an actor model for building distributed systems. Orleankka addresses some limitations of Orleans like lack of support for F# and unit testing actors in isolation. It demonstrates concepts of Orleans like grains, silos, and clusters. Examples show how to define and use typed actors in F# with Orleankka's functional API.
Eric Holscher gave a talk on testing in Django at Djangocon 2009. He discussed the state of testing in Django and how it has improved. He encouraged testing applications to ensure code quality and ability to adapt to changes. Holscher provided an overview of different types of tests like doctests, unit tests, and functional tests and tools available for testing. He highlighted goals for continued improvements to testing in Django like test-only models and better test coverage reporting.
Nasal passages allow air to flow into and out of the lungs. Django's built-in testing framework has some pain points such as tests being slow, crowded, and overbroad. Django Nose improves upon Django's testing framework by enabling test discovery, attributes, generators, and XML output to make tests faster, more flexible, and scalable.
Exception Handling: Designing Robust Software in RubyWen-Tien Chang
The document discusses exception handling in Ruby. It begins with explaining why exception handling is important for building robust software. It then covers various aspects of exception handling in Ruby including raising exceptions, rescuing exceptions, ensuring code is executed, retrying code, and using else blocks. It provides guidelines for proper exception handling practices such as only raising exceptions for unexpected situations. The document concludes by discussing different failure handling strategies like ensuring exception safety and categorizing operational errors versus programmer errors.
This document provides an overview and examples of using the Pytest testing framework. Some key points:
- Pytest allows writing tests in plain Python functions, with test discovery and running. It supports fixtures for dependency injection and parametrizing tests.
- Basic usage involves writing test functions prefixed with "test_" and running pytest to discover and execute them. Fixtures provide a way to inject dependencies into tests.
- Fixtures can be defined and applied at various scopes (function, class, module). They support dependency injection, parameterization, setup/teardown functionality.
- Pytest offers many options for running tests selectively, debugging failures, tracing execution, and extending functionality through plugins. It aims to make
Effective testing with Pytest focuses on using Pytest to its full potential. Key aspects include using fixtures like monkeypatch and mocker to control dependencies, libraries like factoryboy and faker to generate test data, and freezegun to control time. Tests should be fast, readable, and maintainable by applying best practices for organization, parametrization, markers, and comparing results in an effective manner.
This document provides an introduction to unit testing in Python and the Pytest framework. It discusses writing unit test code using the unittest framework and Pytest, how to test functions and handle failures. It also covers features of Pytest like skipping and expected failures, fixture setup/teardown, and distributed testing using the xdist plugin.
The document discusses testing in Django and provides an overview of writing tests from an evolutionary perspective. It begins by introducing the speaker and asking attendees to raise their hands based on their testing experience. It then defines what a test is, using an example of manually testing a function in the Python interpreter. It describes how tests can evolve to be automated and integrated into Django's testing framework. Finally, it outlines four key reasons for writing tests: to fix bugs only once, enable refactoring, serve as documentation, and clarify thinking.
This document discusses testing untestable code. It begins with an introduction and agenda. It then discusses what constitutes untestable code and some techniques for making code more testable, including dependency injection, manipulating include paths, namespaces, and mocking filesystems. It also discusses strategies for testing procedural code and internal functions. Finally, it introduces the concept of generative programming and generating test code from configurations.
Integration testing with spring @JAX MainzVictor Rentea
Our sleep is better with longer-scoped tests. Our life is brighter if we don’t rely heavily on fine-grained tests that break whenever we refactor even the smallest detail. I’m talking about tilting the balance towards more integration than unit testing. And for that, let’s look at the testing features offered by the most used Java Framework today. We’ll see how to write fake test implementations, how to mock an unwanted Spring bean, what a Transactional Test is, and if and how to test your web endpoints. Along the way, we’ll also see Flaky tests, and discuss best practices about integration testing – all in an entertaining live coding session.
Your takeaways from this talk will be a lot of good practices and techniques directly applicable to your day-to-day project.
The document provides an overview of options for iOS development including HTML5, cross-platform frameworks like Titanium and PhoneGap, and native iOS development using Objective-C. HTML5 allows using existing web technologies but has limited hardware access and cross-browser issues. Cross-platform frameworks provide better hardware access but compatibility may vary. Native development using Objective-C offers the most control and best performance but only works on iOS. Xcode is used for native iOS development. An introduction to Objective-C covers classes, methods, and basic syntax similar to C with object-oriented additions.
Pure functions and immutable objects @dev nexus 2021Victor Rentea
aaaaThis presentation focuses on two of the most advanced design tools in your toolbox, whatever the language or framework you might be using. After understanding the basics, we'll see how these concepts can be used in real-world scenarios to simplify those several most complex use-cases in your application. At the end of a mix of slides and live-coding, you'll finally understand the power of these ideas and become prepared to apply them in your day-to-day work.
Along the way, we'll introduce concepts like Side Effects, Idempotency, Referential Transparency, Pure Functions and Deep/Shallow Immutability. Also, we'll talk about the powerful Functional Code / Imperative Shell architecture that you can use for your complex workflows.
Prepare for an entertaining, highly interactive session that will answer all your questions.
Written in Java and spoken in English.
This document provides an overview of GoogleMock, a mocking framework for C++. It defines what a mock object is and why they are useful for testing. GoogleMock allows specifying expectations for mock method calls, including how many times a method will be called and what it will return. It provides matchers to check arguments and actions to define return values or behaviors. The document demonstrates how to write mock classes, set expectations, and use mocks in tests to verify code interactions and behavior.
Testing most things in JavaScript - LeedsJS 31/05/2017Colin Oakley
Testing is important - it can improve the quality of your code and give you the reassurance to refactor without fear of destroying your application.
My talk will cover different types of automated testing in javascript (unit, integration, acceptance) and some regression as well tools to help standardise code (like js lint).
I'll also talk about automated build tools like jenkins and travis ci.
Unit testing of java script and angularjs application using Karma Jasmine Fra...Samyak Bhalerao
The document discusses unit testing of JavaScript and AngularJS applications using the Karma-Jasmine framework. It covers what testing and unit testing are, introduces the Karma test runner and Jasmine testing framework, and provides details on setting up Karma configuration files and writing tests using Jasmine specifications and matchers. The document also outlines how to test various aspects of AngularJS applications like controllers, services, directives and HTTP requests.
Rails makes it easy to write your tests with Minitest (A default testing framework used by rails).
This slide contains contents about:
1. WHY IS UNIT TEST NECESSARY / SO IMPORTANT?
- Unit Test make it easy to learn Rails Way.
2. THINGS YOU SHOULD KNOW
- You need to have database for test environment.
3. DIRECTORIES FOR TEST IN RAILS
4. WHAT IS FIXTURES?
5. MODEL TEST IN ACTION
- test_helper.rb
- Youre Test Case < ActiveSupport::TestCase < Minitest::Test
- A simple approach for TDD (Test Driven Development)
6. AVAILABLE ASSERTIONS
레일스는 Minitest 를 기본 테스팅 프레임워크로 포함하고 있습니다.
이 슬라이드에서는 미니테스트와 관련된 레일스 단위 테스트 관련 기본 개념에 대해서 설명합니다.
또한, 간단한 모델 테스트 케이스를 이용하여 실제 테스트를 수행하는 방법에 대해서 간략히 설명합니다.
How Testability Inspires AngularJS Design / Ran MizrahiRan Mizrahi
Testability is a major part of design decision making in Angular`s development.
In this sessions we’ll cover what testability is, how it inspires Angular`s design and why it’s good for us.
This document summarizes a presentation about exception propagation in PostgreSQL and Python. It discusses how stored procedures in PostgreSQL raise generic exceptions that provide limited information. The author then describes Exceptable, a Python library that defines a common exception hierarchy. It uses a decorator to catch database exceptions and re-raise custom exceptions, improving error handling and separation of concerns between the database and application layers. Examples show how it makes permission errors and other exceptions more usable and identifiable.
Angular Unit Testing from the TrenchesJustin James
For a number of years now we have been hearing about all of the benefits that automated unit testing provides like increasing our quality, catching errors earlier, ensuring that all developers are testing in the same manner and deploying updates with high confidence that nothing will break. Testing a Web UI though was difficult and fragile which meant that typically we had no automated unit test for our Web UI. This is no longer the case with the latest release of Angular. Unit testing is now a first class citizen in Angular.
Out of the box, the project generated by the Angular CLI has unit testing setup with Karma and Jasmine and includes sample tests. Generating new components, services, and pipes includes the unit test Spec file already wired up. Thus allowing you to focus on writing your unit tests and not on the infrastructure needed to get them running. The barriers to writing unit test have been destroyed.
This talk will walk through getting started unit testing your Angular components, services, and pipes. Along the way I will share the tips and tricks that I have learned as I have implemented unit testing on my Angular projects at a Fortune 100 company. You will walk away ready to immediately implement unit testing on your Angular project.
For a number of years now we have been hearing about all of the benefits that automated unit testing provides like increasing our quality, catching errors earlier, ensuring that all developers are testing in the same manner and deploying updates with high confidence that nothing will break. Testing a Web UI though was difficult and fragile which meant that typically we had no automated unit test for our Web UI. This is no longer the case with the latest release of Angular. Unit testing is now a first class citizen in Angular.
Out of the box, the project generated by the Angular CLI has unit testing setup with Karma and Jasmine and includes sample tests. Generating new components, services, and pipes includes the unit test Spec file already wired up. Thus allowing you to focus on writing your unit tests and not on the infrastructure needed to get them running. The barriers to writing unit test have been destroyed.
This talk will walk through getting started unit testing your Angular components, services, and pipes. Along the way I will share the tips and tricks that I have learned as I have implemented unit testing on my Angular projects at a Fortune 100 company. You will walk away ready to immediately implement unit testing on your Angular project.
This document contains sample questions and explanations for the OCP Java SE 8 Exam. It includes multiple choice questions related to Java streams and lambda expressions. The questions cover topics like distinct(), filter(), sorted(), peek(), map(), limit(), and compareTo. The explanations provide the correct answers and reasoning for each question.
The Colombo Plan is seeking two Monitoring and Evaluation Experts - Finance to oversee the financial monitoring of its Afghanistan Women's Shelter Fund and Afghanistan Children's Support Center Fund programs. The positions are based in Kabul, Afghanistan and require at least 7 years of experience in accounting, budgeting, or financial grant reporting. Key responsibilities include developing financial monitoring procedures, overseeing transactions and reporting, and preparing weekly, monthly and quarterly financial reports. Applicants should have a Bachelor's degree in a relevant field like project management or finance and be proficient in financial databases and Excel.
The document outlines the background and objectives of Continuous Comprehensive Evaluation (CCE) in Indian schools. It discusses how CCE aims to shift the focus from testing to holistic learning by evaluating academic and non-academic aspects of a student's development on a regular basis throughout the school year. CCE was introduced to reduce stress, encourage skills-based learning, and use evaluations to improve teaching and learning. The document details the implementation of CCE from standards 1-8, including formative and summative assessments, evaluation tools and marking schemes. The overall goal of CCE is to evaluate a student's growth in a broad-based and continuous manner.
Exception Handling: Designing Robust Software in RubyWen-Tien Chang
The document discusses exception handling in Ruby. It begins with explaining why exception handling is important for building robust software. It then covers various aspects of exception handling in Ruby including raising exceptions, rescuing exceptions, ensuring code is executed, retrying code, and using else blocks. It provides guidelines for proper exception handling practices such as only raising exceptions for unexpected situations. The document concludes by discussing different failure handling strategies like ensuring exception safety and categorizing operational errors versus programmer errors.
This document provides an overview and examples of using the Pytest testing framework. Some key points:
- Pytest allows writing tests in plain Python functions, with test discovery and running. It supports fixtures for dependency injection and parametrizing tests.
- Basic usage involves writing test functions prefixed with "test_" and running pytest to discover and execute them. Fixtures provide a way to inject dependencies into tests.
- Fixtures can be defined and applied at various scopes (function, class, module). They support dependency injection, parameterization, setup/teardown functionality.
- Pytest offers many options for running tests selectively, debugging failures, tracing execution, and extending functionality through plugins. It aims to make
Effective testing with Pytest focuses on using Pytest to its full potential. Key aspects include using fixtures like monkeypatch and mocker to control dependencies, libraries like factoryboy and faker to generate test data, and freezegun to control time. Tests should be fast, readable, and maintainable by applying best practices for organization, parametrization, markers, and comparing results in an effective manner.
This document provides an introduction to unit testing in Python and the Pytest framework. It discusses writing unit test code using the unittest framework and Pytest, how to test functions and handle failures. It also covers features of Pytest like skipping and expected failures, fixture setup/teardown, and distributed testing using the xdist plugin.
The document discusses testing in Django and provides an overview of writing tests from an evolutionary perspective. It begins by introducing the speaker and asking attendees to raise their hands based on their testing experience. It then defines what a test is, using an example of manually testing a function in the Python interpreter. It describes how tests can evolve to be automated and integrated into Django's testing framework. Finally, it outlines four key reasons for writing tests: to fix bugs only once, enable refactoring, serve as documentation, and clarify thinking.
This document discusses testing untestable code. It begins with an introduction and agenda. It then discusses what constitutes untestable code and some techniques for making code more testable, including dependency injection, manipulating include paths, namespaces, and mocking filesystems. It also discusses strategies for testing procedural code and internal functions. Finally, it introduces the concept of generative programming and generating test code from configurations.
Integration testing with spring @JAX MainzVictor Rentea
Our sleep is better with longer-scoped tests. Our life is brighter if we don’t rely heavily on fine-grained tests that break whenever we refactor even the smallest detail. I’m talking about tilting the balance towards more integration than unit testing. And for that, let’s look at the testing features offered by the most used Java Framework today. We’ll see how to write fake test implementations, how to mock an unwanted Spring bean, what a Transactional Test is, and if and how to test your web endpoints. Along the way, we’ll also see Flaky tests, and discuss best practices about integration testing – all in an entertaining live coding session.
Your takeaways from this talk will be a lot of good practices and techniques directly applicable to your day-to-day project.
The document provides an overview of options for iOS development including HTML5, cross-platform frameworks like Titanium and PhoneGap, and native iOS development using Objective-C. HTML5 allows using existing web technologies but has limited hardware access and cross-browser issues. Cross-platform frameworks provide better hardware access but compatibility may vary. Native development using Objective-C offers the most control and best performance but only works on iOS. Xcode is used for native iOS development. An introduction to Objective-C covers classes, methods, and basic syntax similar to C with object-oriented additions.
Pure functions and immutable objects @dev nexus 2021Victor Rentea
aaaaThis presentation focuses on two of the most advanced design tools in your toolbox, whatever the language or framework you might be using. After understanding the basics, we'll see how these concepts can be used in real-world scenarios to simplify those several most complex use-cases in your application. At the end of a mix of slides and live-coding, you'll finally understand the power of these ideas and become prepared to apply them in your day-to-day work.
Along the way, we'll introduce concepts like Side Effects, Idempotency, Referential Transparency, Pure Functions and Deep/Shallow Immutability. Also, we'll talk about the powerful Functional Code / Imperative Shell architecture that you can use for your complex workflows.
Prepare for an entertaining, highly interactive session that will answer all your questions.
Written in Java and spoken in English.
This document provides an overview of GoogleMock, a mocking framework for C++. It defines what a mock object is and why they are useful for testing. GoogleMock allows specifying expectations for mock method calls, including how many times a method will be called and what it will return. It provides matchers to check arguments and actions to define return values or behaviors. The document demonstrates how to write mock classes, set expectations, and use mocks in tests to verify code interactions and behavior.
Testing most things in JavaScript - LeedsJS 31/05/2017Colin Oakley
Testing is important - it can improve the quality of your code and give you the reassurance to refactor without fear of destroying your application.
My talk will cover different types of automated testing in javascript (unit, integration, acceptance) and some regression as well tools to help standardise code (like js lint).
I'll also talk about automated build tools like jenkins and travis ci.
Unit testing of java script and angularjs application using Karma Jasmine Fra...Samyak Bhalerao
The document discusses unit testing of JavaScript and AngularJS applications using the Karma-Jasmine framework. It covers what testing and unit testing are, introduces the Karma test runner and Jasmine testing framework, and provides details on setting up Karma configuration files and writing tests using Jasmine specifications and matchers. The document also outlines how to test various aspects of AngularJS applications like controllers, services, directives and HTTP requests.
Rails makes it easy to write your tests with Minitest (A default testing framework used by rails).
This slide contains contents about:
1. WHY IS UNIT TEST NECESSARY / SO IMPORTANT?
- Unit Test make it easy to learn Rails Way.
2. THINGS YOU SHOULD KNOW
- You need to have database for test environment.
3. DIRECTORIES FOR TEST IN RAILS
4. WHAT IS FIXTURES?
5. MODEL TEST IN ACTION
- test_helper.rb
- Youre Test Case < ActiveSupport::TestCase < Minitest::Test
- A simple approach for TDD (Test Driven Development)
6. AVAILABLE ASSERTIONS
레일스는 Minitest 를 기본 테스팅 프레임워크로 포함하고 있습니다.
이 슬라이드에서는 미니테스트와 관련된 레일스 단위 테스트 관련 기본 개념에 대해서 설명합니다.
또한, 간단한 모델 테스트 케이스를 이용하여 실제 테스트를 수행하는 방법에 대해서 간략히 설명합니다.
How Testability Inspires AngularJS Design / Ran MizrahiRan Mizrahi
Testability is a major part of design decision making in Angular`s development.
In this sessions we’ll cover what testability is, how it inspires Angular`s design and why it’s good for us.
This document summarizes a presentation about exception propagation in PostgreSQL and Python. It discusses how stored procedures in PostgreSQL raise generic exceptions that provide limited information. The author then describes Exceptable, a Python library that defines a common exception hierarchy. It uses a decorator to catch database exceptions and re-raise custom exceptions, improving error handling and separation of concerns between the database and application layers. Examples show how it makes permission errors and other exceptions more usable and identifiable.
Angular Unit Testing from the TrenchesJustin James
For a number of years now we have been hearing about all of the benefits that automated unit testing provides like increasing our quality, catching errors earlier, ensuring that all developers are testing in the same manner and deploying updates with high confidence that nothing will break. Testing a Web UI though was difficult and fragile which meant that typically we had no automated unit test for our Web UI. This is no longer the case with the latest release of Angular. Unit testing is now a first class citizen in Angular.
Out of the box, the project generated by the Angular CLI has unit testing setup with Karma and Jasmine and includes sample tests. Generating new components, services, and pipes includes the unit test Spec file already wired up. Thus allowing you to focus on writing your unit tests and not on the infrastructure needed to get them running. The barriers to writing unit test have been destroyed.
This talk will walk through getting started unit testing your Angular components, services, and pipes. Along the way I will share the tips and tricks that I have learned as I have implemented unit testing on my Angular projects at a Fortune 100 company. You will walk away ready to immediately implement unit testing on your Angular project.
For a number of years now we have been hearing about all of the benefits that automated unit testing provides like increasing our quality, catching errors earlier, ensuring that all developers are testing in the same manner and deploying updates with high confidence that nothing will break. Testing a Web UI though was difficult and fragile which meant that typically we had no automated unit test for our Web UI. This is no longer the case with the latest release of Angular. Unit testing is now a first class citizen in Angular.
Out of the box, the project generated by the Angular CLI has unit testing setup with Karma and Jasmine and includes sample tests. Generating new components, services, and pipes includes the unit test Spec file already wired up. Thus allowing you to focus on writing your unit tests and not on the infrastructure needed to get them running. The barriers to writing unit test have been destroyed.
This talk will walk through getting started unit testing your Angular components, services, and pipes. Along the way I will share the tips and tricks that I have learned as I have implemented unit testing on my Angular projects at a Fortune 100 company. You will walk away ready to immediately implement unit testing on your Angular project.
This document contains sample questions and explanations for the OCP Java SE 8 Exam. It includes multiple choice questions related to Java streams and lambda expressions. The questions cover topics like distinct(), filter(), sorted(), peek(), map(), limit(), and compareTo. The explanations provide the correct answers and reasoning for each question.
The Colombo Plan is seeking two Monitoring and Evaluation Experts - Finance to oversee the financial monitoring of its Afghanistan Women's Shelter Fund and Afghanistan Children's Support Center Fund programs. The positions are based in Kabul, Afghanistan and require at least 7 years of experience in accounting, budgeting, or financial grant reporting. Key responsibilities include developing financial monitoring procedures, overseeing transactions and reporting, and preparing weekly, monthly and quarterly financial reports. Applicants should have a Bachelor's degree in a relevant field like project management or finance and be proficient in financial databases and Excel.
The document outlines the background and objectives of Continuous Comprehensive Evaluation (CCE) in Indian schools. It discusses how CCE aims to shift the focus from testing to holistic learning by evaluating academic and non-academic aspects of a student's development on a regular basis throughout the school year. CCE was introduced to reduce stress, encourage skills-based learning, and use evaluations to improve teaching and learning. The document details the implementation of CCE from standards 1-8, including formative and summative assessments, evaluation tools and marking schemes. The overall goal of CCE is to evaluate a student's growth in a broad-based and continuous manner.
A person was lying outside on a night of a full moon when they noticed out of the corner of their eye that a doll had moved. They closed their eyes and screamed, feeling a surge of energy pass through their body that was released as they imagined destroying the doll. The person concluded that destroying the doll twice would satisfy them.
The document discusses the benefits of exercise for mental health. Regular physical activity can help reduce anxiety and depression and improve mood and cognitive function. Exercise causes chemical changes in the brain that may help protect against mental illness and improve symptoms.
A person was lying outside on a night of a full moon when they noticed out of the corner of their eye that a doll had moved. They closed their eyes and screamed, feeling a surge of energy pass through their body that was released as they imagined destroying the doll. They concluded that destroying the doll into a million pieces would be acceptable.
The document discusses the culture and history of African Americans from the 18th century to present day. It describes how African American culture developed out of slavery and segregation in the South, and how the Great Migration during World War I allowed many to relocate to northern cities for new opportunities and escape discrimination. It also discusses the persistence of racism through Jim Crow laws and segregation, and how African American culture and influence has continued to grow over the centuries.
This document provides an overview of natural pigments used as food colorants, focusing on carotenoids, anthocyanins, and betalains. It discusses the distribution, biosynthesis, functions, extraction and characterization of these pigments. Carotenoids are synthesized through the isoprenoid pathway and serve important roles in photosynthesis, as antioxidants, and in promoting health. Anthocyanins are water-soluble pigments responsible for the red, blue, and purple colors in many fruits and vegetables. Their stability can impact color retention during food processing. Betalains are unique to the Caryophyllales order and provide color to beetroots and other plants. The document examines the regulatory aspects and importance of using natural
The document discusses the Blue Brain project which aims to create a virtual human brain through detailed computer simulation. The Blue Brain would function similarly to a natural human brain through receiving input, interpreting it, and generating output. Uploading a human brain would involve nanobots scanning brain structure and activity and inputting that data into a powerful supercomputer. The project seeks to advance understanding of human cognition and potentially treat conditions like Parkinson's.
The document discusses the market for carbonated soft drinks, milk-based drinks, and fruit juices and nectars in India, noting that Coca Cola and PepsiCo have almost equal market share for soft drinks while Amul dominates the milk-based drinks market. It also outlines the key players and growth trends in the fruit juices and nectars segment, as well as the strengths, weaknesses, opportunities, and threats for sugarcane juice as a potential new beverage product.
This document discusses testing strategies for the iOS Sync Engine. It provides overall test stats, including that unit tests make up 80% of tests and integration tests make up 20%. The main testing strategy is to test against a fake backend called MockTransportSession, which provides advantages like speed, flexibility and independence over using stubs. MockTransportSession simulates the real backend by making fake requests, managing an internal database, and responding to requests. Future plans include splitting tests into smaller frameworks to reduce runtime, running tests on pull requests, and using record/replay to keep MockTransportSession in sync with the real backend.
The document discusses unit testing anti-patterns. It describes implementation anti-patterns like long tests with many assertions, long test files, tests with complex logic, slow tests, and tests that cannot fail. It also describes workflow anti-patterns like writing tests last, only testing for regression, testing elsewhere than in unit tests, only running tests from the command line, and not using continuous integration. It suggests approaches like writing independent tests, avoiding redundant tests, and testing frequently to avoid these anti-patterns.
This document provides an overview of software testing concepts. It discusses different types of testing like unit testing, functional testing, error path testing, boundary value testing, and equivalence partitioning. It also covers test strategies like golden path testing, black box testing, and white box testing. The purpose of a tester is explained as quantifying risk to make decisions that improve confidence and quality.
Inside the design decisions of Bane, a test harness for sockets. This talk discusses the key design decisions of Bane, presents some code, and looks at some of Bane's automated tests.
Van Wilson
Senior Consultant with Cardinal Solutions
Find more by Van Wilson: https://speakerdeck.com/vjwilson
All Things Open
October 26-27, 2016
Raleigh, North Carolina
Kill the mutants - A better way to test your testsRoy van Rijn
This document discusses mutation testing as a way to thoroughly test code. Mutation testing works by automatically making small changes or "mutations" to code and seeing if tests can detect the changes. It can find bugs in test code that simple code coverage misses. The document explains how to implement mutation testing with the PIT tool, which can generate mutants, run tests against mutant code, and produce reports. Mutation testing improves test quality but requires more computing resources than basic testing.
Kill the mutants and test your tests - Roy van RijnNLJUG
Quis custodiet ipsos custodes? Better known as: *Who watches the watchmen?* We are all writing tests, doing TDD, BDD. We measure the quality of the tests with line coverage or (even better) branch coverage. This gives you a false sense of security. I've seen projects with tests which have 100% branch coverage but not a single assertion! This is where mutation testing helps out. By creating broken mutated instances of your codebase (mutants) this should result in failing unit tests. This way we can verify that slight code changes (like real life bugs) actually break your tests. In this talk I'll explain what mutation testing is and how it works. We'll also compare some Java frameworks (PIT, Jester, Jumble) that enable automatic mutation testing in your continuous build and how you can start doing mutation testing *right now*.
Introduction to functional idioms in Java 8, language-extending functional libraries and short overview of reasons for adoption of such programming style.
Examples and snippets available here: https://github.com/lbialy/functionaljava8
O CPAN tem as ferramentas que você precisa para fazer TDD em Perl, o Coding D...Rodolfo Carvalho
Rodolfo Carvalho discussed Test-Driven Development (TDD) in Perl. He covered how to write tests first using modules like Test::More and Test::Most, then code to pass the tests. An example was provided of incrementally developing a Fibonacci function using TDD. He also discussed testing web applications with Test::WWW::Mechanize and Test::Mojo. Finally, he promoted regular coding dojos as a way to practice TDD in pairs and learn from others.
Mal ganz ehrlich: Testen im Frontend hat noch nie viel Spaß gemacht. In meinem Talk möchte ich mit Jest eine Testbibliothek vorstellen, die genau das ändern kann. Jest ist ohne viel Konfiguration direkt einsetzbar und bringt alles mit, was man von einer Testbibliothek erwartet (und noch mehr). An vielen praktischen Beispielen möchte ich meine Lieblingsfeatures wie z.B. Snapshot-Tests, Mocking oder das tolle CLI erläutern und zeigen, dass Testen im Frontend durchaus Spaß machen kann. Eine Ausrede weniger, um auf das Testen im Frontend zu verzichten!
Test Driven Development (TDD) is a software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases that are failed, then the software is improved to pass the new tests, and finally any newly introduced code is refactored. The document outlines the TDD lifecycle and process, describes unit testing and how it verifies isolated units of code, and discusses how TDD results in testable, clean code through refactoring. It provides examples of unit testing code for a bank account class.
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...FalafelSoftware
A complete introduction to unit testing, and test-first development for AngularJS programmers. Topics include tools, specs, test runners, core testing practices and patterns, Behavior-driven development, Spys, Matchers, Stubs and MOcks and much more.
This document provides an introduction to unit testing. It discusses what should and should not be tested, how to structure tests using the Arrange Act Assert pattern, and tips for writing good tests. Some key points covered include testing complex code, edge cases, classes that change often, and avoiding testing globals, statics, and database interactions. The goal is to have tests that are independent, test single behaviors, and help find bugs when code changes.
From a Joomla Day Midwest presentation, this focuses on unit testing in the open source Joomla project. The slides wrap around two demonstrations that cannot be included here.
The document discusses what tests are in Rails and how to write them. It explains that tests should validate functionality, set up data using factories, perform an action, and make an assertion. Tests can be written for models, controllers, and views using RSpec. When tests run, any fixture data is reset, "let" blocks are run for setup, the test method is executed, and teardown blocks are run. Tests can be run using the 'guard' or 'rspec' commands.
Leveling Up With Unit Testing - LonghornPHP 2022Mark Niebergall
Writing unit testing on a project can seem like a daunting task, and earning team and leadership buy-in can be challenging. Level up your skillset as we cover PHPUnit and Prophecy setup with composer, writing meaningful tests, restructuring existing classes with dependency injection to allow for unit testing, using mock objects, and releasing code confidently with test coverage. We'll also discuss overcoming common biases, unit testing challenges, and shortcomings of unit testing.
Building unit tests correctly with visual studio 2013Dror Helper
Unit testing is now considered a mainstream practice, but that does not mean it is as common, pervasive or as well understood as it could or should be. Many programmers struggle with the quality of their tests and with the focus of their code. In this session we’ll learn how to write good unit testing code.
2. Unit
Tests
Practical
Andrew Fray, Spry Fox
Thank you for coming. This is Practical Unit Tests, and I’m Andrew Fray.
My talk today is about how to structure your unit tests to aid iteration. We’re going to be looking in detail at my unit tests from a shipped AAA console
project, the mistakes I made in writing them, and the concrete costs they caused. Then we’ll look at simple ways to avoid those costs in your own unit
tests.
!
definitions
Post mortem
Anti-patterns
4. #pracunittests
Backwards Is Forward: Making Better
Games with Test-Driven Development
http://gdcvault.com/play/1013416/Backwards-Is-Forward-Making-Better
Sean Houghton, Noel Llopis
http://tinyurl.com/gddtdd
10. #pracunittests
Qualities of Good Unit Tests
Readable - why. up to speed.
Maintainable - how. modify for iterating.
Trustworthy - quick, deterministic. no external resources.
11. #pracunittests
Qualities of Good Unit Tests
Readable
Readable - why. up to speed.
Maintainable - how. modify for iterating.
Trustworthy - quick, deterministic. no external resources.
12. #pracunittests
Qualities of Good Unit Tests
Readable
Maintainable
Readable - why. up to speed.
Maintainable - how. modify for iterating.
Trustworthy - quick, deterministic. no external resources.
13. #pracunittests
Qualities of Good Unit Tests
Readable
Maintainable
Trustworthy
Readable - why. up to speed.
Maintainable - how. modify for iterating.
Trustworthy - quick, deterministic. no external resources.
17. #pracunittests
F1 2011 X360/PS3/PC
• Isolated new subsystem
• 502 tests, 6700 lines of test code
PRODUCTION CODE => SUBSYSTEM CODE
HIGHLIGHT loc
shipped 4+ previously
18. #pracunittests
F1 2011 X360/PS3/PC
• Isolated new subsystem
• 502 tests, 6700 lines of test code
• 6200 lines of production code
PRODUCTION CODE => SUBSYSTEM CODE
HIGHLIGHT loc
shipped 4+ previously
26. #pracunittests
// in LinearDescriptionFixture…
void testBackwardsToNormalLeftwardsGradient() {
LinearDescription leftDesc = DefaultFlatLinearDescription()
.withGradient(1f).withInitialValue(10.0f).withOffsetOrigin(0.0f)
.withDirection(Direction.eLeft);
TEST_GREATER(leftDesc.getValueAtOffset(-1.0f), 10.0f);
}
1/4: The Opaque Anti-Pattern
types: light grey
names: bold dark grey
literals: red
else: dark grey
27. #pracunittests
// in LinearDescriptionFixture…
void testBackwardsToNormalLeftwardsGradient() {
LinearDescription leftDesc = DefaultFlatLinearDescription()
.withGradient(1f).withInitialValue(10.0f).withOffsetOrigin(0.0f)
.withDirection(Direction.eLeft);
TEST_GREATER(leftDesc.getValueAtOffset(-1.0f), 10.0f);
} wat
1/4: The Opaque Anti-Pattern
types: light grey
names: bold dark grey
literals: red
else: dark grey
28. #pracunittests
Opaque: Hard to see HOW
void testBackwardsToNormalLeftwardsGradient() {
LinearDescription leftDesc = DefaultFlatLinearDescription()
.withGradient(1f).withInitialValue(10.0f).withOffsetOrigin(0.0f)
.withDirection(Direction.eLeft);
TEST_GREATER(leftDesc.getValueAtOffset(-1.0f), 10.0f);
}
types: light grey
names: bold dark grey
literals: red
else: dark grey
29. #pracunittests
Opaque: Hard to see HOW
void testBackwardsToNormalLeftwardsGradient() {
LinearDescription leftDesc = DefaultFlatLinearDescription()
.withGradient(1f).withInitialValue(10.0f).withOffsetOrigin(0.0f)
.withDirection(Direction.eLeft);
TEST_GREATER(leftDesc.getValueAtOffset(-1.0f), 10.0f);
}
types: light grey
names: bold dark grey
literals: red
else: dark grey
30. #pracunittests
Opaque: Hard to see HOW
void testBackwardsToNormalLeftwardsGradient() {
LinearDescription leftDesc = DefaultFlatLinearDescription()
.withGradient(1f).withInitialValue(10.0f).withOffsetOrigin(0.0f)
.withDirection(Direction.eLeft);
TEST_GREATER(leftDesc.getValueAtOffset(-1.0f), 10.0f);
}
types: light grey
names: bold dark grey
literals: red
else: dark grey
68. #pracunittests
The Wet Anti-Pattern
• Hard-to-maintain hacky tests?
• Keep production sensibilities in unit test code
• Stay DRY with helper functions and custom
asserts
breathe at end!
69. #pracunittests
The Wet Anti-Pattern
• Hard-to-maintain hacky tests?
• Keep production sensibilities in unit test code
• Stay DRY with helper functions and custom
asserts
• Do not hide the call to the function under test
breathe at end!
70. #pracunittests
3/4: The Deep Anti-Pattern
> Test failed:
> getOwnerAtOffset_WithOwner_ReferencesOwnerAtManyOffsets
> With Assert: VehicleID 0 != 1
on introducing a bug
chi == “kai”!
80. #pracunittests
The Deep Anti-Pattern
• Test failures not fully informative?
• Too many explicit assumptions per test
• Minimise assumptions per test
breathe at end!
101. #pracunittests
The Wide Anti-Pattern
• False-negative test failures?
• Many implicit assumptions
• Isolate code with seams, to enable
simple fake impostors
breathe at end!
102. #pracunittests
Recap
Respect unit test quality as much as production code quality
Write once, read many
Only 1 explicit assumption
As few as possible implicit assumptions
103. #pracunittests
Recap
• Respect unit test source code as much as
production source code
Respect unit test quality as much as production code quality
Write once, read many
Only 1 explicit assumption
As few as possible implicit assumptions
104. #pracunittests
Recap
• Respect unit test source code as much as
production source code
• Write once, read many
Respect unit test quality as much as production code quality
Write once, read many
Only 1 explicit assumption
As few as possible implicit assumptions
105. #pracunittests
Recap
• Respect unit test source code as much as
production source code
• Write once, read many
• Only 1 explicit assumption
Respect unit test quality as much as production code quality
Write once, read many
Only 1 explicit assumption
As few as possible implicit assumptions
106. #pracunittests
Recap
• Respect unit test source code as much as
production source code
• Write once, read many
• Only 1 explicit assumption
• Minimise implicit assumptions
Respect unit test quality as much as production code quality
Write once, read many
Only 1 explicit assumption
As few as possible implicit assumptions
107. #pracunittests
• andrew.fray@gmail.com
• @tenpn
• andrewfray.wordpress.com
• Roy Osherove: Art of Unit Testing
www.artofunittesting.com
• Michael Feathers: Working
Effectively with Legacy Code
• Steve Freeman & Nat Pryce:
Growing Object-Orientated
Software, Guided By Tests
Colour scheme by Miaka www.colourlovers.com/palette/444487/Curiosity_Killed
Feedback!
Thank the CAs!