Parasoft delivers a complete framework to create, manage, and extract greater value from unit tests. We help you exercise and test an incomplete system—enabling you to identify problems when they are least difficult, costly, and time-consuming to fix. This reduces the length and cost of downstream processes such as debugging. Moreover, since all tests are written at the unit level, the test suite can be run independent of the complete system. This allows you to isolate code behavior changes, reduces setup complexities, and makes it practical to execute the test suite on a daily basis.
Robot Framework is a generic keyword-driven test automation framework for acceptance level testing and acceptance test-driven development (ATDD). It has an easy-to-use tabular syntax for creating test cases and its testing capabilities can be extended by test libraries implemented either with Python or Java. Users can also create new keywords from existing ones using the same simple syntax that is used for creating test cases.
Old presentation was updated on 1st of September, 2014. Content stayed mostly the same but examples were enhanced. Copyrights and some links were also updated a bit later. The presentation is nowadays hosted on GitHub where you can find the original in ODP format: https://github.com/robotframework/IntroSlides
Beginners - Get Started With Unit Testing in .NETBaskar K
Beginners - Get started with unit testing in .NET. Introduction to unit testing and mocking.. List of unit testing frameworks available in .NET - NUnit, xUnit.net, Visual Studio unit test framework. List of mocking frameworks available in .NET - Moq, Rhino Mocks, FakeItEasy, NSubstitue, JustMock, and TypeMock. Introduction to Visual Studio Unit Testing Framework, NUnit and xUnit.net.
Robot Framework is a generic keyword-driven test automation framework for acceptance level testing and acceptance test-driven development (ATDD). It has an easy-to-use tabular syntax for creating test cases and its testing capabilities can be extended by test libraries implemented either with Python or Java. Users can also create new keywords from existing ones using the same simple syntax that is used for creating test cases.
Old presentation was updated on 1st of September, 2014. Content stayed mostly the same but examples were enhanced. Copyrights and some links were also updated a bit later. The presentation is nowadays hosted on GitHub where you can find the original in ODP format: https://github.com/robotframework/IntroSlides
Beginners - Get Started With Unit Testing in .NETBaskar K
Beginners - Get started with unit testing in .NET. Introduction to unit testing and mocking.. List of unit testing frameworks available in .NET - NUnit, xUnit.net, Visual Studio unit test framework. List of mocking frameworks available in .NET - Moq, Rhino Mocks, FakeItEasy, NSubstitue, JustMock, and TypeMock. Introduction to Visual Studio Unit Testing Framework, NUnit and xUnit.net.
Acceptance Test Driven Development and Robot FrameworkSteve Zhang
This presentation is about using Robot Framework automation test framework to implement Acceptance Test Driven Development, BDD or Specification By Example
This is my complete introductory course for Software Test Automation.If you need full training that includes different automation tools (Selenium, J-Meter, Burp, SOAP UI etc), feel free to contact me by email (amraldo@hotmail.com) or by mobile (+201223600207).
BDD (Behavior-driven development), also known as ATDD (Acceptance test–driven development) is a software development process that helps Agile teams design, develop, test and deliver software efficiently, it's about how to implement agile acceptance testing and binding business requirements to code. BDD helps to bridge the communication gap between stakeholders and implementation teams, build quality into software from the start, design, develop and deliver systems fit for purpose. SpecFlow is the official tool to implement BDD on the .NET platform.
Load Testing Best Practices: Application complexity is increasing, yet the stringent requirements for web performance is increasing exponentially. Learn more about the three major types of load testing, determine which you need and how to conduct them.
This presentation deals with a complex approach to application testing in back end and front end parts, tests writing and common mistakes. It also includes a short overview of libraries and frameworks for creation of tests, as well as practical examples of code.
Presentation by Pavlo Iuriichuk, Lead Software Engineer, GlobalLogic, Kyiv), delivered at an open techtalk on December 11, 2014.
More details - http://globallogic.com.ua/report-web-testing-techtalk-2014
Aiming at complete code coverage by unit tests tends to be cumbersome, especially for cases where external API calls a part of the code base. For these reasons, Python comes with the unittest.mock library, appearing to be a powerful companion in replacing parts of the system under test.
Acceptance Test Driven Development and Robot FrameworkSteve Zhang
This presentation is about using Robot Framework automation test framework to implement Acceptance Test Driven Development, BDD or Specification By Example
This is my complete introductory course for Software Test Automation.If you need full training that includes different automation tools (Selenium, J-Meter, Burp, SOAP UI etc), feel free to contact me by email (amraldo@hotmail.com) or by mobile (+201223600207).
BDD (Behavior-driven development), also known as ATDD (Acceptance test–driven development) is a software development process that helps Agile teams design, develop, test and deliver software efficiently, it's about how to implement agile acceptance testing and binding business requirements to code. BDD helps to bridge the communication gap between stakeholders and implementation teams, build quality into software from the start, design, develop and deliver systems fit for purpose. SpecFlow is the official tool to implement BDD on the .NET platform.
Load Testing Best Practices: Application complexity is increasing, yet the stringent requirements for web performance is increasing exponentially. Learn more about the three major types of load testing, determine which you need and how to conduct them.
This presentation deals with a complex approach to application testing in back end and front end parts, tests writing and common mistakes. It also includes a short overview of libraries and frameworks for creation of tests, as well as practical examples of code.
Presentation by Pavlo Iuriichuk, Lead Software Engineer, GlobalLogic, Kyiv), delivered at an open techtalk on December 11, 2014.
More details - http://globallogic.com.ua/report-web-testing-techtalk-2014
Aiming at complete code coverage by unit tests tends to be cumbersome, especially for cases where external API calls a part of the code base. For these reasons, Python comes with the unittest.mock library, appearing to be a powerful companion in replacing parts of the system under test.
Infrastructure testing with Molecule and TestInfraTomislav Plavcic
Presentation defines what infrastructure as code is and what are some of the frameworks used for writing and testing it. More info is provided about Molecule framework which is used for testing Ansible roles and also TestInfra framework which can be used as a verifier with Molecule, but also as a standalone test framework.
Node.js behind: V8 and its optimizationsDawid Rusnak
Do you know how really your code is working behind? It’s very useful to be aware of mechanisms and optimizations which your engine will perform. I will tell you how your code is processed and run, and how it could affect you in day-by-day development.
Performed at Code Europe 2017: https://www.codeeurope.pl
Property Based Testing is an process to build robust systems.
It facilitates a deeper understanding of the system under test. It can be used on any testing level: unit, integration or functional.
The presentation introduces how Property Based Testing works, how to use it with PHPUnit, and in what way it differentiates from example based tests.
It talks about strategies to find good properties to check for.
This presentation was built for the Meet-Magento conference 2020 in Mumbai.
Similar to Unit testing on embedded target with C++Test (20)
The FDA recommends implementing a coding standard during medical device software development. In practice, this means running a static analysis tool to detect any problematic constructs that could lead to problems down the road.
But if you think you can simply download an analyzer and go, you might consider that the FDA requires documented details associated with code quality activities.
What standard are you going to check against? What rules in the analyzer cover the standard? Which rules are you suppressing? The implementation of static analysis is enough to cause headaches, gastrointestinal discomfort, and other side-effects.
This webinar prescribes some static analysis implementation best practices to relieve your FDA compliance symptoms, including:
The benefits of static analysis and what to look for in an analyzer
How to automate static analysis execution
How to integrate static analysis within your software development processes.
How to reduce noise and stop wasting time manually triaging results
Parasoft Concerto A complete ALM platform that ensures quality software can b...Engineering Software Lab
Parasoft Concerto is a complete software development management platform that ensures quality software can be produced consistently and efficiently–in any language.
By integrating policy-driven project management with Parasoft Test's quality lifecycle management as well as Parasoft Virtualize's dev/test environment management, Parasoft Concerto ensures predictable project outcomes while driving unprecedented levels of productivity and application quality.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
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.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
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
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.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
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.
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.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
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.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
2. Agenda
Introduction
What are the embedded systems
What is Unit Testing
Unit Testing With C++test
General flow
Test cases generation
Unit Testing in Embedded Environments
General flow
Runtime requirements
Building test executable
Pros, Cons, limitations
Questions ....
4. What is an embedded system ?
An embedded system is a combination of computer
hardware and the software, and perhaps additional
mechanical or other parts, designed to perform a
specific function.
(Michael Barr - Programming Embedded Systems)
5. A generic embedded system
Memory
Functional devices
Inputs Processor Outputs
6. Example 1 - VCR
VCR can be made of:
8 bit processor
ROM and RAM
Mechanical
components
Analog modules
for signal
processing
Platform targeted
operating system
7. Example 2 - Opportunity
Opportunity:
CPU RAD6000
(RISC)
128 MB DRAM
3 MB EEPROM
256 MB FLASH
Running on
VxWORKS
(WindRiver)
operating system
8. Example 3 - Pendolino
Composed of many
sub systems running
on different
hardware platforms
and different
operating systems
9. Development process
Host Machine CPU
deployment
Cross development
environment Target Platform
MEM
10. Unit Testing
In computer programming, a unit test is a
procedure used to validate that a particular module
of source code is working properly. The procedure is
to write test cases for all functions and methods so
that whenever a change causes a regression, it can
be quickly identified and fixed.
(www.wikipedia.org)
11. Unit testing with C++test
-test flow
-test harness architecture
-test cases
-regression testing
12. Unit Testing with C++test
Automatic test cases generation
Test cases in a form of source code
Coverage metrics
Post-Conditions recording for regression testing
Automatic Stubs configuration
Automatic test flow management
Command line mode
Convenient reporting system
13. From source code to test results
test results
C++test
instrumented
source Parser user source
code
Instr Generator
Test Cases test cases Test
Generator source Executable
runtime
library
libraries Libraries Scanner stub
source
Stub Manager
14. Tests architecture - example
#include <header>
int funcB();
int funcA(int b)
{
int a = funcB();
return a + b;
}
15. Tests architecture - example
Test Executable
test runner
main() { instrumented code
call_test_case Int funcA(int a) {
.....} instr_callback();
int b = funcB_stub();
instr_callback();
return a + b;
}
test_case
{
pre_cond Stubs
funcA() funcB_stub() {
post_cond return 0;
} }
17. Test cases architecture
Test case is composed of
TestSuite_MyClass::test_foo_0() three sections:
{
//PreCondition initialization
int arg_1 = 0;
MyClass testObject(); Pre conditions setup
//Tested function call
Tested function call
int ret = testObject.func(arg1); Post conditions
//PostConditions validation validation
CPPTEST_ASSERT(ret == 1)
}
18. Automatic test cases generation
C++test's test cases generator automatically
produces source elements for:
Initializing pre-conditions like: function arguments,
global variables, 'this' object for tested function
Calling the tested function or method
Validating post-conditions (achieved test result)
19. Initialization strategies
Simple (built-in) types:
Integers (-1,0,1, min, max value)
Floating point (-1.0, 0.0, 1.0, max, min positive, max,
min negative)
Heuristic values
Complex types (user defined types) C++test will
use available constructors and generate code
necessary to initialize constructors arguments.
20. Initialization strategies
Pointer types:
NULL pointer
address of a local object created on stack
address of an object created with “new” (on heap)
Reference types:
local object created on stack
object created using operator “new”
Heuristic values for simple types:
int
float
char *
21. Post conditions
C++test provides macros and routines for controlling
how source code test results are collected and
validated:
Test case post-conditions are controlled via
assertion macros (similar to CppUnit)
CPPTEST_ASSERT_INTEGER_EQUAL(expected,actual)
Assertions perform a condition validation and send
results back to C++test
22. Test case example with post-conditions
/* CPPTEST_TEST_CASE_BEGIN test_bufLen_0 */
void TestSuite_bufLen_0::test_bufLen_0()
{
/* Pre-condition initialization */
/* Initializing argument 0 (this) */
/* Initializing constructor argument 1 (fill) */
char _fill_0 = '001';
::Data _cpptest_TestObject (_fill_0);
/* Tested function call */
int _return = _cpptest_TestObject.bufLen();
/* Post-condition check */
CPPTEST_ASSERT_INTEGER_EQUAL(4, ( _return ))
CPPTEST_ASSERT(( _cpptest_TestObject._data ) != 0)
}
23. Regression test cases generation
subsequent test runs
generation Test results
Test cases Validation Testing
generation
First test execution
Test cases
Regression
test cases
25. Stubs – handling missing definitions
Instrumented
Libraries source code
&
object files
Auto generated
stubs
int func2()
{
return 0;
}
extern int func2();
int func1(int b) User defined
{ stubs
int a = func2();
return a + b;
}
26. Stubs in C++test
Stubs are used:
when testing in separation from other modules
when application module is not yet ready
when hardware module is not yet ready
C++test provides three modes for stubbed
function:
original
user-defined
auto-generated
Stubs configuration is managed from C++test GUI
and persisted in C++test project
27. Unit Testing in embedded environments
-test flow
-runtime library
-problems & limitations
-why to unit test on target ?
28. Unit testing in embedded environment
C++test
runtime
Cross Compiler
runtime
linker/locator
library library
source
Test
executable
Test
Test harness
harness binaries
source
deploy
code
host - target communication
results
29. Unit testing in embedded environment
Host
Development env Target
C++test deploy
Test executable
Runtime library
Listening communication
agent communication channel module
31. C++test runtime library
Provided in form of source code
Implemented in plain C
Needs to be cross-compiled for specific target
platform
Contains definition of communication channel
Provided implementations:
file
TCP/IP sockets
Designed to be easily customizable
33. Target-to-host communication module
Custom implementation of communication channel
can be plugged in
Defining communication channel requires
implementing four methods:
cpptestInitializeCommunication(...);
cpptestFinalizeCommunication(...);
cpptestSendData(const char* data, unsigned size);
All data transfer operations, performed inside C+
+test runtime library are implemented in terms of
above interface
34. Collecting results on target
Host
Target
C++test
Test executable
Manual results Runtime library
transfer
File communication
System module
Local
Storage
35. “On the fly” results transfer
Host
Target
C++test
TCP/IP Sockets Test executable
RS 232
RS 485
I2C
ICE Runtime library
File Listening communication
System agent communication channel module
37. Exceptions handling
C++test uses
Test cases execution
sequence exceptions handling
facilities (try, catch,
Test setjmp, longjmp,
case 1 signal) to recover if
exception is thrown
exception
during test sequence
handling enabled
Test
With exceptions
case 2
(e.g divide
by zero) If target platform does
not provide exceptions
handling, test sequence
Test
is broken on first
case n exception and needs to
be restarted
39. Test flow automation
Test sequence can be automatically performed in
C++test GUI as well as in command line mode
Test sequence consists of test harness
preparation, building test executable, deploying
test executable, starting it, and collecting results
Limitations in automation of testing process can be
imposed be development environment
C++test provides easy to use XML-based format
for defining test framework operations
41. Problems & limitations
Not enough memory on the target device to store
test harness and tested code may block or limit
testing capabilities
Compilation without debug information
Original file Min Instr Med Instr Max Instr
GNU GCC 3.2 22 KB 22 KB (0%) 29 KB (30%) 41 KB (80%)
MSVC++ 7.1 33 KB 33 KB (0%) 41 KB (24%) 69 KB (100%)
Tornado simpc 23 KB 23 KB (0%) 30 KB (30%) 41 KB (78%)
42. Problems & limitations
Lack of communication channel may effect in weak
test automation
Missing support for exceptions handling may
increase the number of runs necessary to execute
test cases scheduled for test session.
Additional amount of work required during
development process
44. Pros of unit testing on target
All well known positives from host-based unit
testing (early bugs detection, increased code
robustness, ...)
Possibility of detecting hardware problems
Possibility of detecting software/hardware
interaction problems
Easy stubbing of missing software (also hardware)
modules
Quick and automated generation of regression
suites
45. Unit testing in embedded environment - example
static int iTemperatures[2];
“Critical section”
void interrupt vReadTemperatures(void) { related bugs are hard
ITemperatures[0] = /*Read sensor 1*/ to detect during host-
ITemperatures[1] = /*Read sensor 2*/ based unit testing
}
Target-based unit
bool testSensors() { testing highly increases
int iTemp0, iTemp1; probability of catching
iTemp0 = ITemperatures[0];
this kind of problems,
iTemp1 = ITemperatures[1];
if (iTemp0 != iTemp1) { // Alarm !!!
however it does not
return -1; provide 100% certainty
} of catching them.
return 0;
}
46. Unit testing in embedded environment - example
Module for driving the position
of functional mechanical
equipment
servo Hardware contains “stuck-at-
encoder zero” problem between the
encoder and board interface
int set_position(int angl)
{
if (angl < MIN || angl > MAX)
{
return INCORRECT_ANGL;
}
return run_servo(angl);
}
47. Epilog
C++test offers a high level of automation for tasks
which are usually performed manually, especially in
embedded environments, therefore very often it lets
us give the positive answer for a question:
“to test ? or not to test ?”