Advanced Verification Methodology for Complex System on Chip VerificationVLSICS Design
Verification remains the most significant challenge in getting advanced SOC devices in market. The
important challenge to be solved in the Semiconductor industry is the growing complexity of SOCs.
Industry experts consider that the verification effort is almost 70% to 75% of the overall design effort.
Verification language cannot alone increase verification productivity but it must be accompanied by a
methodology to facilitate reuse to the maximum extent under different design IP configurations. This
Advanced reusable test bench development will decrease the time to market for a chip. It will help in code
reuse so that the same code used in sub-block level can be used in block level and top level as well that
helps in saving cost for a tape-out of a chip. This test bench development technique will help us to achieve
faster time to market and will help reducing the cost for the chip up to a large extent.
What is main difference between Behavior Driven Development and Acceptance Test Driven Development? How can we start using one of these practices. What books should you read to get more details about Testing By Specification?
Advanced Verification Methodology for Complex System on Chip VerificationVLSICS Design
Verification remains the most significant challenge in getting advanced SOC devices in market. The
important challenge to be solved in the Semiconductor industry is the growing complexity of SOCs.
Industry experts consider that the verification effort is almost 70% to 75% of the overall design effort.
Verification language cannot alone increase verification productivity but it must be accompanied by a
methodology to facilitate reuse to the maximum extent under different design IP configurations. This
Advanced reusable test bench development will decrease the time to market for a chip. It will help in code
reuse so that the same code used in sub-block level can be used in block level and top level as well that
helps in saving cost for a tape-out of a chip. This test bench development technique will help us to achieve
faster time to market and will help reducing the cost for the chip up to a large extent.
What is main difference between Behavior Driven Development and Acceptance Test Driven Development? How can we start using one of these practices. What books should you read to get more details about Testing By Specification?
TEST CASE PRIORITIZATION USING FUZZY LOGIC BASED ON REQUIREMENT PRIORITIZINGijcsa
Boolean expressions are popularly used for modelling decisions or conditions in specifications or source
programs and they are very much prone to introduction of faults. Even for a Boolean expression with few
numbers of literals the possible number of test cases can be quite large. Boolean expressions with n
variables require 2n
test cases to distinguish from faulty expression. In practice, n can be quite large and
there are examples of specification having Boolean expressions with 30 or more variables. To test a system
based on Boolean specification in limited time, it is not possible to execute all test cases so prioritization is
required which leads to early fault detection in testing life cycle. There are various testing strategies for
generation of test cases for Boolean specifications like MUMCUT, which generate fewer test cases then 2
n
with high probabilities of finding errors but their prioritization are not considering the criteria from user’s
perspective. We have proposed a new approach which prioritizes test cases based on requirement
prioritization. Our aim is to find the severe faults from user’s perspective early in the testing process and
hence to improve the quality of the software .This paper considers method for assigning weight value on the
basis of factors which generates the criteria for test case prioritization for Boolean Specifications. These
factors are: Business Value Measure (BVM), Project Change Volatility (PCV), and Development
Complexity (DC). Priority is assigned to test cases based upon these factors using fuzzy logic model.
The Best Pairwise Testing Tool / Best Orthogonal Array Tool Just Got BetterJustin Hunter
Powerful New Feature Enhancements now allow
Pairwise testing
Orthogonal array testing
More thorough n-way testing
Requirements traceability
Seeding of high priority scenarios
Automatic generation of detailed test scripts with tester instructions
Automatic inclusion of rules-based Expected Results
Exporting into Quality Center
Exporting into mind maps
And a lot more
A Study: The Analysis of Test Driven Development And Design Driven TestEditor IJMTER
There are various types of testing methods. In this paper, we have discussed TDD and
DDT. Test driven development method is a type of agile methodology. In this method, test drives the
design. Basically, TDD is a unit testing. It is a test-first approach method[15]. This method can be a
never ending process, because we are writing the test first, then writing the code to make the test
pass. If test fails then again we will change the code and then we will test again. Using this method,
defect rate can be reduced to 50%. But DDT cannot be a never ending process, because we design
first, then we implement that design any way. TDD is more complex to implement, while DDT is a
bit easier
Common Challenges & Best Practices for TDD on iOSDerek Lee Boire
Presented at the June 2016 Tokyo iOS Meetup on 6/11/2016, in this presentation I give an overview of test driven development and how it can be used when developing for iOS / Swift.
TDD is an enormous topic so this really just scratches the surface to give an expansive glimpse into the journey that TDD truly is. Those unfamiliar with TDD will hopefully have a desire to learn more about it while those familiar will hopefully learn something new.
Evaluating effectiveness factor of object oriented design a testability pers...ijseajournal
Effectiveness is important quality factor to testability measurement of object oriented software at an initial
stage of software development process exclusively at design phase for high quality product. It will help
developer’s design capability to achieve the specified functionalities, characteristics, better design quality
and behavior using appropriate object oriented design (OOD) concepts and procedures. Metric based
model for ‘Effectiveness Quantification Model of Object Oriented Design’ has been proposed by
establishing the correlation between effectiveness and OOD constructs. Later ‘Effectiveness Quantification
Model’ is empirically validated and statistical significance of the study considers the high correlation for
model acceptance. The aim of this research work is to encourage researchers and developers for inclusion
of the effectiveness quantification model to access and quantify software effectiveness quality factor at
design time.
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Ukraine
16 грудня 2021 року відбувся GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Personal Skill”! Анатолій Сахно (Software Testing Consultant, GlobalLogic) розібрав принципи TDD (розробки, керованої тестами) та приклади їх застосування. Крім того, поговорили про:
- Ефективне використання модульних тестів у повсякденних задачах;
- Використання TDD при розробці тестових фреймворків;
- Застосування принципів TDD при написанні функціональних автотестів.
Більше про захід: https://www.globallogic.com/ua/about/events/globallogic-test-automation-online-techtalk-test-driven-development-as-a-personal-skill/
Приємного перегляду і не забудьте залишити коментар про враження від TechTalk!
Ця активність — частина заходів в рамках GlobalLogic Test Automation Advent Calendar, ще більше заходів та цікавинок за посиланням: https://bit.ly/AdventCalendar_fb
TEST CASE PRIORITIZATION USING FUZZY LOGIC BASED ON REQUIREMENT PRIORITIZINGijcsa
Boolean expressions are popularly used for modelling decisions or conditions in specifications or source
programs and they are very much prone to introduction of faults. Even for a Boolean expression with few
numbers of literals the possible number of test cases can be quite large. Boolean expressions with n
variables require 2n
test cases to distinguish from faulty expression. In practice, n can be quite large and
there are examples of specification having Boolean expressions with 30 or more variables. To test a system
based on Boolean specification in limited time, it is not possible to execute all test cases so prioritization is
required which leads to early fault detection in testing life cycle. There are various testing strategies for
generation of test cases for Boolean specifications like MUMCUT, which generate fewer test cases then 2
n
with high probabilities of finding errors but their prioritization are not considering the criteria from user’s
perspective. We have proposed a new approach which prioritizes test cases based on requirement
prioritization. Our aim is to find the severe faults from user’s perspective early in the testing process and
hence to improve the quality of the software .This paper considers method for assigning weight value on the
basis of factors which generates the criteria for test case prioritization for Boolean Specifications. These
factors are: Business Value Measure (BVM), Project Change Volatility (PCV), and Development
Complexity (DC). Priority is assigned to test cases based upon these factors using fuzzy logic model.
The Best Pairwise Testing Tool / Best Orthogonal Array Tool Just Got BetterJustin Hunter
Powerful New Feature Enhancements now allow
Pairwise testing
Orthogonal array testing
More thorough n-way testing
Requirements traceability
Seeding of high priority scenarios
Automatic generation of detailed test scripts with tester instructions
Automatic inclusion of rules-based Expected Results
Exporting into Quality Center
Exporting into mind maps
And a lot more
A Study: The Analysis of Test Driven Development And Design Driven TestEditor IJMTER
There are various types of testing methods. In this paper, we have discussed TDD and
DDT. Test driven development method is a type of agile methodology. In this method, test drives the
design. Basically, TDD is a unit testing. It is a test-first approach method[15]. This method can be a
never ending process, because we are writing the test first, then writing the code to make the test
pass. If test fails then again we will change the code and then we will test again. Using this method,
defect rate can be reduced to 50%. But DDT cannot be a never ending process, because we design
first, then we implement that design any way. TDD is more complex to implement, while DDT is a
bit easier
Common Challenges & Best Practices for TDD on iOSDerek Lee Boire
Presented at the June 2016 Tokyo iOS Meetup on 6/11/2016, in this presentation I give an overview of test driven development and how it can be used when developing for iOS / Swift.
TDD is an enormous topic so this really just scratches the surface to give an expansive glimpse into the journey that TDD truly is. Those unfamiliar with TDD will hopefully have a desire to learn more about it while those familiar will hopefully learn something new.
Evaluating effectiveness factor of object oriented design a testability pers...ijseajournal
Effectiveness is important quality factor to testability measurement of object oriented software at an initial
stage of software development process exclusively at design phase for high quality product. It will help
developer’s design capability to achieve the specified functionalities, characteristics, better design quality
and behavior using appropriate object oriented design (OOD) concepts and procedures. Metric based
model for ‘Effectiveness Quantification Model of Object Oriented Design’ has been proposed by
establishing the correlation between effectiveness and OOD constructs. Later ‘Effectiveness Quantification
Model’ is empirically validated and statistical significance of the study considers the high correlation for
model acceptance. The aim of this research work is to encourage researchers and developers for inclusion
of the effectiveness quantification model to access and quantify software effectiveness quality factor at
design time.
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Ukraine
16 грудня 2021 року відбувся GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Personal Skill”! Анатолій Сахно (Software Testing Consultant, GlobalLogic) розібрав принципи TDD (розробки, керованої тестами) та приклади їх застосування. Крім того, поговорили про:
- Ефективне використання модульних тестів у повсякденних задачах;
- Використання TDD при розробці тестових фреймворків;
- Застосування принципів TDD при написанні функціональних автотестів.
Більше про захід: https://www.globallogic.com/ua/about/events/globallogic-test-automation-online-techtalk-test-driven-development-as-a-personal-skill/
Приємного перегляду і не забудьте залишити коментар про враження від TechTalk!
Ця активність — частина заходів в рамках GlobalLogic Test Automation Advent Calendar, ще більше заходів та цікавинок за посиланням: https://bit.ly/AdventCalendar_fb
#DOAW16 - DevOps@work Roma 2016 - Testing your databasesAlessandro Alpi
In these slides we will speak about how to unit test our programmability in SQL Server and how to move from a manual process to an automated one in order to achieve the goals of DevOps
This was a workshop given on the UTN University, for the Software Engineering students. The idea is to give a brief explanation about TDD, and how to use it.
Informatica DVO Training enables developers to create rules to test the data.Data Validation Option Online Training is the process of verifying the accuracy.
For more info visit : https://www.globalonlinetrainings.com/informatica-dvo-training
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.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
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.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
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.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Evaluating Test Driven Development And Parameterized Unit Testing In Dot Net Presentation
1. Evaluating Test Driven Development [TDD] and Parameterized Unit Test [PUT] in .NET Web Platform Prepared By: Md. Fazlul Alam Chowdhury, Email: mdfachowdhury@hotmail.com Blog: http://fazlulchowdhury.blogspot.com Date: 14.04.2010 1
6. Topics Covered (ii) MVC .NET Test Suite Parameterized Unit Testing (PUT) and Microsoft PEX Strengths and Limitation of Testing Tools Agile Influence in Visual Studio Team Foundation Scope of Future Research and Improvement Conclusion References 3
7. Abstract (i) Web technology has become widely accepted application platform this days. It brings the remote and distributed application integration more successful. It brings parties together from distant places and helps making decisions more collaboratively and effectively. So, to have a reliable and well tested portal application Test Driven Design is obvious. 4
8. Abstract (ii) Application Test Driven Development or simply TDD is an evolutionary approach to produce well tested reliable and shippable code and thus improving the quality of the software through Fault avoidance and Fault detection at early stages and Fault recovery with simpler effort. In Test First Design or TFD approach, codes are being written to fail, executing tests and then updating the functional codes to pass. TDD is basically the combination of TFD and Refactoring. 5
9. Introduction This report is concentrated on Evaluating TDD in.NET environment. Web Application testing comprises of Functionality, Usability, Interface, Compatibility, Performance and Security which is a broad area from testing perspective. Not any of the available toolset performs testing for all the scenarios. So, we tried to narrow down some Web Testing Tools and concepts which contributed to the World Wide acceptance to .NET Applications. 6
10. What is Quality? Quality is a term that stands for wide variety of aspects for a particular product or environment. How well the environment is or how good the product is based on some specific criteria could be regarded as Quality. According to Gerald Weinberg: “Quality is a Value to some person” By Dr. Tom DeMarco “Product's quality is a function of how much it changes the world for the better” Reliability, Scalability, Correctness, Completeness, Maintainability, Extensibility, Fault Tolerance etc. are the key selling points of Software Quality http://ase.cpsc.ucalgary.ca/ase/uploads/SENG515615W2010/Lecture4_Agile_Engineering_Practices.pdf 7
11. Quality Control Vs. Quality Assurance (i) ISO 9001 Definition of Quality Control The operational techniques and activities that are used to fulfill requirements for quality Quality Assurance All those planned and systematic activities implemented to provide adequate confidence that an entity will fulfill requirements for quality http://elsmar.com/pdf_files/QC%20vs%20QA.pdf 8
12. Quality Control Vs. Quality Assurance (ii) QC Vs. QA Product Process Reactive Proactive Line function Staff function Find defects Prevent defects Walkthrough Quality Audit Testing Defining Process Inspection Selection of tools Checkpoint review Training http://elsmar.com/pdf_files/QC%20vs%20QA.pdf 9
13. Test Driven Development The term TDD has been around since NASA’ s Project, Mercury in 1960s. But, when Kent Beck and Ward Cunningham introduced TDD as a eXtreme Programming (XP) practice, it started gaining popularity. So, What is TDD? 10
14. What is Test Driven Development? Ref: A Survey of Evidence for Test Driven Development in Academia, Chetan Desai, David Janzen, Kyle Savage Computer Science California Polytechnic State University San Luis Obispo, California USA {cdesai, djanzen}@calpoly.edu 11
15.
16. Resulting improvement in software qualityEvaluating the Efficacy of Test-Driven Development: Industrial Case Studies, ThirumaleshBhat & NachiappanNagappan 12
17. Windows networking team case study Project A: Context Factor Project A: Product Measure Project A: Outcome Evaluating the Efficacy of Test-Driven Development: Industrial Case Studies, ThirumaleshBhat & NachiappanNagappan 13
18. MSN Team case study Project B: Context Factor Project B: Product Measure Project B: Outcome Evaluating the Efficacy of Test-Driven Development: Industrial Case Studies, ThirumaleshBhat & NachiappanNagappan 14
41. What to Test? Refactoring Databases: Evolutionary Database Design, by Scott W. Ambler and Pramod J. Sadalage, Addison Wesley Professional ISBN#: 0-321-29353-3 http://www.ambysoft.com/books/refactoringDatabases.html 22
42. Database Testing with DBUnit DBUnit is a Open Source Database Testing Framework which was created by Manuel Laflamme DBUnit is a Database Unit Testing Framework to Test Database Driven Classes, Procedures or Functions. NUnit, MVC .NET/Visual Studio Testing platforms can be used to build a standard test suite Following Operations can be performed using DBUnit UPDATE TRUNCATE INSERT REFRESH DELETE CLEAN_INSERT DELETE_ALL NONE Other Operations Composite Operation Transaction Operation Identity Insert Operation 23
44. Creating a DBUnit Test Class Create a XML Dataset or Export Data from Databases 25 If the DBUnit Test Class Name is DbUnitTestCase then the Data Set name has to be DbUnitTestCaseDataset.xml and has to be in the same folder Flat XML: <?xml version="1.0" encoding="utf-8" ?> <dataset> <table_name col1="value" /> </dataset>
45. Create a Test Class and Extend DBTestCase using System; using System.Data; using System.Data.Sql; using System.Data.SqlClient; using System.Collections.Generic; using System.Reflection; using System.Xml; using DbUnit.Framework; using DbUnit.Core; using DbUnit.Dataset; using NUnit.Framework; using NMock2; namespace MyDBUnitProject { [TestFixture] public class MyDBUnitTestCase2 : DbUnitTestCase { private SqlConnection connection = null; Mockery mocks; private IDataSet dataset; 26
46. Implement SetUp and TearDown [SetUp] public void SetUpTestCase() { mocks = new Mockery(); dataset = new EmbeddedFlatXmlDataSet(this.GetType()); connection = new SqlConnection("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=BIteDB;Data Source=localhostsqlexpress"); connection.Open(); } [TearDown] public void TearDownTestCase() { connection.Close(); ; } 27
47. Implement Test Method [Test] public void TestQuerySQLMessage() { string _sql = "SELECT AttachmentLink as ReturnValue from Message WHERE CAST(MsgContent AS varchar(4000)) ='My Test'"; SqlCommand _cmd = new SqlCommand(_sql, connection); SqlDataReader _reader = _cmd.ExecuteReader(); string _AttachmentLink = ""; while (_reader.Read()) { _AttachmentLink = _reader["ReturnValue"].ToString(); } Assert.AreNotEqual("", _AttachmentLink); } [Test] public void TableNameSetCorrectly() { Assert.AreEqual("table_name", dataset.Tables[0].Name); } 28
49. DBUnit Benefits DBUnit provides a stable framework to create and adopt Database Test cases with minimal effort It can manage the state of database through the test’s life cycle At the end of testing the database can be placed back into its pre-test state A database can be populated with a desired data set before a test DBUnit test can easily automated by controlling major dependencies DBUnit test can be performed utilizing most types of database objects (Tables, Views, Stored Procedures) DBUnit Tests do not require manual intervention between tests DBUnit Test results doesn’t need manual interpretation Code stability increases in a Team environment Easy to Learn and Implement Wide range of support for standard databases DBUnit documentation is pretty well defined DBUnit tests are easily manageable It is easier to generate the seed data using the dump feature 30
50. DBUnit Limitations Primary test data is XML but it is also possible to create test cases for standard databases Test Data generation plan is absent and so have to create and refresh the test dataset when Actual schema changes and so the seed and resulted data could be different Primary support for XML Dataset is Flat XML and need to have all columns defined in the first row DBUnit does not support multiple Resultset 31
52. Database Testing with MS DB Pro The desire on the part of the database developer to use familiar T-SQL scripts to express the unit-test logic and the desire to take advantage of powerful Microsoft® .NET Framework-targeted languages Encapsulating the test in T-SQL code and then hosting the T-SQL in C# or Visual Basic .NET code. The unit-test designer generates both, enabling either (or both) to be modified to meet individual needs. Database unit testing with Team System provides or supports the features for entire framework and using proper context [Authentication and Security Aspects etc.] Apply Test-Driven Development to your Database Projects - Jamie Laflen http://msdn.microsoft.com/en-us/magazine/cc164243.aspx#S2 33
54. Stored Preocedure CREATE PROCEDURE [dbo].[uspGetEmployeeManagers] @EmployeeID [int] AS BEGIN SET NOCOUNT ON; -- Use recursive query to list out all Employees required for a particular Manager WITH [EMP_cte]([EmployeeID], [ManagerID], [FirstName], [LastName], [Title], [RecursionLevel]) -- CTE name and columns AS ( SELECT e.[EmployeeID], e.[ManagerID], c.[FirstName], c.[LastName], e.[Title], 0 -- Get the initial Employee FROM [HumanResources].[Employee] e INNER JOIN [Person].[Contact] c ON e.[ContactID] = c.[ContactID] WHERE e.[EmployeeID] = @EmployeeID UNION ALL SELECT e.[EmployeeID], e.[ManagerID], c.[FirstName], c.[LastName], e.[Title], [RecursionLevel] + 1 -- Join recursive member to anchor FROM [HumanResources].[Employee] e INNER JOIN [EMP_cte] ON e.[EmployeeID] = [EMP_cte].[ManagerID] INNER JOIN [Person].[Contact] c ON e.[ContactID] = c.[ContactID] ) -- Join back to Employee to return the manager name SELECT [EMP_cte].[RecursionLevel], [EMP_cte].[EmployeeID], [EMP_cte].[FirstName], [EMP_cte].[LastName], [EMP_cte].[ManagerID], c.[FirstName] AS 'ManagerFirstName', c.[LastName] AS 'ManagerLastName' -- Outer select from the CTE FROM [EMP_cte] INNER JOIN [HumanResources].[Employee] e ON [EMP_cte].[ManagerID] = e.[EmployeeID] INNER JOIN [Person].[Contact] c ON e.[ContactID] = c.[ContactID] ORDER BY [RecursionLevel], [ManagerID], [EmployeeID] OPTION (MAXRECURSION 25) END; 35
60. DB Pro Benfits Feature Tests, Schema Tests, Security Tests, Stock-Data Tests can be performed using DB Pro Automatic generation of SQL script stubs of unit tests for stored procedures, functions, and triggers DB Pro Provides a set of built-in test conditions to verify results including the rows returned, scalar values, and execution time Automatic Generation of Test Data using Data Generation Tool It sets the database state through it’s data generation feature Same Test Data can be generated repeatedly based on seed value Pre-Test, Test and Post Test results could be written, executed and evaluated 41
61. DB Pro Limitations Only supported database is MS SQL Server Need Visual Studio Team System - Database Edition to get the DB Pro Test Suite Supports C#/VB platforms for unit testing Data generation tool needed to use to generate test data and so database sandbox concept is not in there so that may have to work on real data and could be rolled back the data after testing 42
68. Start with Selenium Project in .NET Download Selenium from Download and Install NUnit or Any other testing suite Create a Visual Studio Test Project Reference the following DLLs: nmock.dll, nunit.core.dll, nunit. framework.dll, ThoughtWorks.Selenium.Core.dll, ThoughtWorks.Selenium. IntegrationTests.dll and ThoughtWorks.Selenium.UnitTests.dll Write a Selenium Test Case 48
69. Selenium Test Class namespace MySeleniumTest { [TestFixture] public class MySeleniumTest1 { private ISelenium selenium; private StringBuilderverificationErrors; [SetUp] public void SetupTest() { selenium = new DefaultSelenium("localhost", 2613, "*firefox", "http://localhost:2613"); selenium.Start(); verificationErrors = new StringBuilder(); } [TearDown] public void TeardownTest() { try { selenium.Stop(); } catch (Exception) { // Ignore errors if unable to close the browser } Assert.AreEqual("", verificationErrors.ToString()); } [Test] public void TheNewTest() { selenium.Open("/Home/"); selenium.Click("link=About"); selenium.WaitForPageToLoad("30000"); } } } 49
70. Selenium Benefits Selenium could be used for the functional, regression, load testing of the web based applications. The automation tool could be implemented for post release validation with continuous integration tools like Hudson or CruiseControl. C#, Java, Perl, PHP, Python, Ruby are being supported as the programming/testing platform Selenium allows simple and powerful Document Object Level (DOM) level testing It supports traditional waterfall or Agile environments Selenium is a pretty good tool for continuous integration Selenium support AJAX 50
71. Selenium Limitations Setting up Selenium Test Suite is complex and step by step documentation is hard to find Only supports web application though it has functional, regression, load testing features Diagnostics process is cumbersome In AJAX implementations, it doesn’t know when AJAX process is completed 51
76. How it works? The test harness system consists of three files (ASP .NET Page, Left.Html and Main.Html) ASP .NET Page is loaded into an HTML frame Left.Html which contains the test automation JScript code is loaded into another HTML frame Main.Html container for the two frames and holds a global variable called timesAppLoaded which tracks how many times the Web application under test has been loaded into its test frame Test scenario script uses the timesAppLoaded value to determine exactly what actions to take on the Web app and then reloads the Web application This Cycle continues until the system reaches a final state that you specify in the test script, and a pass or fail result is determined. Ref: Lightweight UI Test Automation for ASP.NET Web Apps, James McCaffrey, http://msdn.microsoft.com/en-us/magazine/cc163814.aspx#S1 54
81. Visual Studio Web UI Test Benefits Creation of Test Cases for Multiple Browser Support and browsers cross-compatibility can be tested using this tool Use different session/data variables for the same test and uncover different feature set according to selected criteria/setting. Let’s say use Admin and Regular user logins Support for AJAX/Silverlight May call and test other test cases(for an example DBUnit/Nunit ) Convert Step to Code option allows testers to capture the outline of the test and dig into the code 59
82. Visual Studio Web UI Test Limitations Need Visual Studio Team System to get the Web UI Testing Platform Supports C#/VB platforms for unit testing Web UI Test is designed for .NET platform 60
89. Web Portal Testing Constraints Testing results may vary from Dev, Test and Production environment Testing results may vary for users with different security settings or grants Blackbox testing is challenging as less control on the environment and html parsing is slow Applying TDD is difficult in web applications as the test cases are written to fail and then write the test case to pass followed by refactoring. So, needs a web portal mock up to test small changes time and again 65
90. MVC Project Layers Abstract Layer Business Layer Data Layer MVC project 66
91. ASP .NET Framework Modules Globalization Caching Controls Master Pages Pages Roles Profile Membership Handlers Intrinsics Etc. 67
92. ASP .NET MVC Framework ASP.NET Dynamic Data Presentation ASP.NET WebForms ASP.NET MVC ASP.NET Core Runtime http://www.asp.net/(S(d35rmemuuono1wvm1gsp2n45))/mvc/ 68
93. ASP.NET MVC Features (i) Separation of application tasks (input logic, business logic, and UI logic), testability, and test-driven development (TDD) by default All core contracts in the MVC framework are interface-based and can be tested by using mock objects, which are simulated objects that imitate the behavior of actual objects in the application Unit-test applications without having to run the controllers in an ASP.NET process, which makes unit testing fast and flexible Any unit-testing framework can be utilized that is compatible with the .NET Framework. 69
94. ASP.NET MVC Features (ii) An extensible and pluggable framework ASP.NET MVC framework components are easily customizable The ASP.NET MVC framework also supports the use of Dependency Injection (DI) and Inversion of Control (IOC) container models. DI allows you to inject objects into a class, instead of relying on the class to create the object itself Support for existing ASP.NET features. ASP.NET MVC lets you use features such as forms authentication and Windows authentication, URL authorization, membership and roles, output and data caching, session and profile state management, health monitoring, the configuration system, and the provider architecture. 70
100. Change Password Method [Authorize] [HttpPost] public ActionResultChangePassword(ChangePasswordModel model) { if (ModelState.IsValid) { if (MembershipService.ChangePassword(User.Identity.Name, model.OldPassword, model.NewPassword)) { return RedirectToAction("ChangePasswordSuccess"); } else { ModelState.AddModelError("", "The current password is incorrect or the new password is invalid."); } } // If we got this far, something failed, redisplay form return View(model); } 76
101. Change Password Test Method [TestMethod] public void ChangePassword_Post_ReturnsRedirectOnSuccess() { // Arrange AccountController controller = GetAccountController(); ChangePasswordModel model = new ChangePasswordModel() { OldPassword = "goodOldPassword", NewPassword = "goodNewPassword", ConfirmPassword = "goodNewPassword" }; // Act ActionResult result = controller.ChangePassword(model); // Assert Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult)); RedirectToRouteResultredirectResult = (RedirectToRouteResult)result; Assert.AreEqual("ChangePasswordSuccess", redirectResult.RouteValues["action"]); } 77
105. ASP.NET MVC Benefits Resolving complexity by dividing an application into the model, the view, and the controller No view state or server-based forms. So, provides full control over the behavior of an application Front Controller pattern processes Web application requests through a single controller Creating application that supports a rich routing infrastructure Provides better support for test-driven development (TDD) Fits into large teams of Developers and Web designers who need a high degree of control over the application behavior. 81
106. ASP.NET MVC Limitations Doesn’t use event model to preserve state over HTTP Doesn’t use view state or server-based forms and so hard to manage states Doesn’t fit well for small teams to implement RAD Complex design for application development, because the components (the Page class, controls, and so on) are tightly integrated and usually require more code than the Traditional Web Application model 82
111. Assertionsvoid Add() { int item = 3; var list = new List(); list.Add(item); var count = list.Count; Assert.AreEqual(1, count); } Ref : Parameterized Unit Testing: Principles, Techniques, and Applications in Practice, Nikolai Tillmann, Peli de Halleux, Wolfram Schulte (Microsoft Research) Tao Xie (North Carolina State University)http://research.microsoft.com/en-us/projects/pex/pexpublictutorialslides.pptx 85
114. Why choose a value which may not make sense?Ref : Parameterized Unit Testing: Principles, Techniques, and Applications in Practice, Nikolai Tillmann, Peli de Halleux, Wolfram Schulte (Microsoft Research) Tao Xie (North Carolina State University)http://research.microsoft.com/en-us/projects/pex/pexpublictutorialslides.pptx 86
115. What is Parameterized Unit Test? Parameterized Unit Test is a Unit Test with Parameters Separation of concerns Data is generated by a tool Developer can focus on functional specification void Add(List list, int item) { var count = list.Count; list.Add(item); Assert.AreEqual(count + 1, list.Count); } Ref : Parameterized Unit Testing: Principles, Techniques, and Applications in Practice, Nikolai Tillmann, Peli de Halleux, Wolfram Schulte (Microsoft Research) Tao Xie (North Carolina State University)http://research.microsoft.com/en-us/projects/pex/pexpublictutorialslides.pptx 87
116. PUT Sample Ref: Parameterized Unit Tests, Nikolai Tillmann (nikolait@microsoft.com), Wolfram Schulte (schulte@microsoft.com), Microsoft Research One Microsoft Way, Redmond WA USA 88
117. Parameterized Unit Testing (PUT) Some popular unit testing tools, like Junit, Nunit doesn’t support the automation of creating unit tests In some cases it even takes more lines of code to create the unit tests than more implementation being tested Some Automatic test generation tools may not even track the divide-by-zero type errors rather than specific error message PUT or Parameterized Unit Test accepts behavioral parameters/argument sets for a specific test method Ref: Automating Software Testing Using Program Analysis, Patrice Godefroid, Peli de Halleux, Aditya V. Nori, Sriram K. Rajamani, Wolfram Schulte, and Nikolai Tillmann, Microsoft Research Michael Y. Levin, Microsoft Center for Software Excellence 89
118. PUT Contributions They allow unit tests to play a greater role as specifications of program behavior. In fact, PUTs are axiomatic specifications. They enable automatic case analysis, which avoids writing implementation-specific unit tests. Their generated test cases often result in complete path coverage of the implementation, which amounts to a formal proof of the PUT’s assertions. Ref: Parameterized Unit Tests, Nikolai Tillmann (nikolait@microsoft.com), Wolfram Schulte (schulte@microsoft.com), Microsoft Research One Microsoft Way, Redmond WA USA 90
119. PUT Framework Symbolic State Constraints Symbolic Evaluation Axioms Test Case generation Ref: Parameterized Unit Tests, Nikolai Tillmann (nikolait@microsoft.com), Wolfram Schulte (schulte@microsoft.com), Microsoft Research One Microsoft Way, Redmond WA USA 91
120. Symbolic State Its is basically the state of program execution. It can contain expressions with symbolic variables. Symbolic expressions: E = | o object ids, infinite set of potential object identifiers | v variables, set of symbolic variable identifiers | t types, set of type identifiers | f(E bar) function application, set of function symbols | For All (v bar).E universal quantification, where x to denote lists of items x1, . . . , xn. Function symbols: equals(x, y) denotes whether x and y represent the same value for value Types, type(x) denotes the runtime type of object x, and len(x) the length of array x Heaps:No of Times a method being called in a nested method call Symbolic state: A symbolic state is a 5-tuple S = (O, A, He,Hi, X), where the current set of objects O is a subset of ObjectId, the program stack A is a stack of activation records, He and Hi are expressions denoting the extensional heap and the intentional heap respectively, and finally, X, an object expression, denotes the current exception. Say: O(S) is being written for projection on S Ref: Parameterized Unit Tests, Nikolai Tillmann (nikolait@microsoft.com), Wolfram Schulte (schulte@microsoft.com), Microsoft Research One Microsoft Way, Redmond WA USA 92
121. Symbolic Evaluation Symbolic Evaluation describes the effect of the current instruction from a given constrained state (S,C). Ref: Parameterized Unit Tests, Nikolai Tillmann (nikolait@microsoft.com), Wolfram Schulte (schulte@microsoft.com), Microsoft Research One Microsoft Way, Redmond WA USA 93
122. Axioms Axiom is basically of summary of external behavior [TestAxiom] public void TestQuickSort(int[] a) { Assume.IsTrue(a != null); QuickSort.Sort(a, 0, a.Length - 1); for (int i = 0; i < a.Length - 1; i++) Assert.IsTrue(a[i] <= a[i + 1]); } Ref: Parameterized Unit Tests, Nikolai Tillmann (nikolait@microsoft.com), Wolfram Schulte (schulte@microsoft.com), Microsoft Research One Microsoft Way, Redmond WA USA 94
123. Test Case Generation Each transition sequence (S0,C0) ! (S1,C1) ! · · · represents a unique execution path of the program. [TestMethod] public void TestQuickSort597() { int[] ints = new int[2]; ints[1] = 1; this.TestQuickSort(ints); } [TestMethod] public void TestQuickSort512() { int[] ints = new int[3]; ints[0] = -2147475453; ints[1] = 1073750016; ints[2] = 8194; this.TestQuickSort(ints); } Ref: Parameterized Unit Tests, Nikolai Tillmann (nikolait@microsoft.com), Wolfram Schulte (schulte@microsoft.com), Microsoft Research One Microsoft Way, Redmond WA USA 95
124. Constraints A constraint on a symbolic state is a pair C = (BG, PC), where BG is the static background, which only depends on the program declarations, and PC is the dynamic path condition, which is built up during symbolic evaluation Ref: Parameterized Unit Tests, Nikolai Tillmann (nikolait@microsoft.com), Wolfram Schulte (schulte@microsoft.com), Microsoft Research One Microsoft Way, Redmond WA USA 96
125. What is Pex? Pex stands for Program Exploration which is a white box test generation tool developed at Microsoft Research that helps developers to write PUTs in .NET platform and thus generate automated test cases For each PUT, Pex uses dynamic test-generation techniques to compute a set of input values that exercise all the statements and assertions in the analyzed program which eventually cover all reachable branches Ref: Automating Software Testing Using Program Analysis, Patrice Godefroid, Peli de Halleux, Aditya V. Nori, Sriram K. Rajamani, Wolfram Schulte, and Nikolai Tillmann, Microsoft Research Michael Y. Levin, Microsoft Center for Software Excellence 97
131. NUnit Test Case [TestFixture] public class UserTest { User _user; [SetUp] public void Setup() { _user = new User(); } [Test] public void EmailTest() { _user.Email = “fazlul@telus.net"; Assert.AreEqual(“fazlul@telus.net", _user.Email); } [Test] public void IsValidTestWhenPasswordsMismatch() { _user.Password = “SENG"; _user.Password = “CPSC"; Assert.IsFalse(_user.IsValid()); } [Test] public void IsValidTestWhenPasswordsMatch() { _user.FirstName = “Fazlul"; _user.LastName = “Chowdhury"; _user.Email = "fazlul@telus.net "; _user.Password = " SENG "; _user.PasswordConfirmation = " SENG "; Assert.IsTrue(_user.IsValid()); } [Test] public void UserNameTest() { _user.Email = "fazlul@telus.net "; Assert.AreEqual(" fazlul@telus.net ", _user.UserName); _user.UserName = "fazlul@telus.net "; Assert.AreEqual("fazlul@telus.net ", _user.Email); } } 103
132. Instantiating PUT in PEX [PexMethod] public string ConvertToUpper([PexAssumeUnderTest]MyPexTest1Class target, string Input) { string result = target.ConvertToUpper(Input); return result; } [PexMethod] public void ConvertToUpperAgain(string Input) { MyPexTest1Class MyP = new MyPexTest1Class(); var First = MyP.ConvertToUpper(Input); var Second = MyP.ConvertToUpper(First); Assert.AreEqual(First, Second); } 104
133. PUT & PEX benefits PUT specifies the external behavior of the methods for all test arguments and so the tests cover all possible test environment and constraints PUTs can be instantiated to re-obtain traditional closed unit tests and to re-verify the result of tests PUT enables automatic case analysis, which avoids writing implementation-specific unit tests Using PUT in PEX, it is fairly simple to auto generate test cases and cover all possible testing scenarios, constraints and values 105
134. PUT & PEX limitations PEX works for deterministic model of test methods and goes in cycle for non deterministic methods until hits exploration bounds PEX doesn’t work in Multi-Thread model PEX can analyze any .NET language but the code generation only supports C# PEX uses an automatic constraint solver to determine which values are relevant for the test and the code-under-test but which is also limited [Say: floating point arithmetic cannot be reasoned precisely] Lack of Tests for Oracle Advanced Concepts : PUT in PEX, http://research.microsoft.com/en-us/projects/pex/pexconcepts.pdf 106
141. Use tools to implement the load according to the designed tests, and capture the metrics
142. Analyze the metric data captured during the testBy using an iterative testing process, these steps should help us achieve our performance objectives Performance Testing Guidance for Web Applications, J.D. Meier, Carlos Farre, PrashantBansode, Scott Barber, and Dennis Rea http://msdn.microsoft.com/en-us/library/bb924372.aspx 109
146. Advantages of TDD centric Web Applications design Code will be separated from the Data layer Easy to understand and code transfer It increases the system performance Easy to maintain documentation 113
147. Conclusion (i) This research was done to investigate numerous testing tools in .NET platform. We found that various testing tools are specialized in specific testing contexts. NUnit/Visual Studio Testing Tools/MVC .NET and Microsoft PEX are built for unit testing where as DBUnit/DB Pro are specialized in Database Testing, Selenium and MS Web test are for Web UI Testing and VS Load Test and Wcat are being used for Load/Stress testing. But, Microsoft Team System Developer edition comes with a full blown test suite of which VS Test is for Unit Testing, DB pro is for database testing, Web Test for web UI testing and VS Load Test is for Load testing. External testing tools like DBUnit and Nunit test cases can also be generated from Visual Studio Testing suite. MVC .NET implements the Model, View and Controller pattern which makes TDD easier for a Web Application. MVC resolves the Server based forms which were difficult to test. MVC framework fits into large teams of Developers and Web designers who need a high degree of control over the application behavior. 114
148. Conclusion (ii) This presentation also highlighted the concept of Parameterized Unit Tests or simply PUT which is basically a generalization of established closed unit tests. Parameterized Unit Test or PUT has been implemented in Microsoft PEX to generate automated Unit tests. Behavioral parameters can be injected into PUT to cover a particular implementation. State Change, Return Values and Exceptional return values states the Method's behavior. Detailed demonstration of PEX covered the Axiomatic approach of Test Methods and it’s test coverage scenario together with automated and regression test generation. 115
149. References Evaluating Current Testing Processes of Web-Portal Applications Link: http://ase.cpsc.ucalgary.ca/ase/uploads/Publications/bajwaMaurerXiong2005a.pdf Multiple Perspectives on Executable Acceptance Test-Driven Development Link: http://ase.cpsc.ucalgary.ca/ase/uploads/Publications/XP2007_Melnik_Maurer.pdf http://ase.cpsc.ucalgary.ca/ase/uploads/SENG515615W2010/Lecture4_Agile_Engineering_Practices.pdf http://elsmar.com/pdf_files/QC%20vs%20QA.pdf http://dotnetslackers.com/articles/aspnet/ASPNETMVCFrameworkPart2.aspx http://www.asp.net/learn/mvc http://www.asp.net/(S(pdfrohu0ajmwt445fanvj2r3))/learn/mvc/tutorial-01-cs.aspx http://ase.cpsc.ucalgary.ca/ase/uploads/Publications/XiongMaurerBajwa2005b.pdf Building Web Apps without Web Forms, Link: http://msdn.microsoft.com/en-us/magazine/cc337884.aspx MVC architecture in ASP. Net using C# and Microsoft Data Access Application block By MunirShaikh February 28, 2006 , Link: http://www.c-sharpcorner.com/UploadFile/munnamax/mvcarchitecture02262006091052AM/mvcarchitecture.aspx http://www.agiledata.org/essays/tdd.html http://msdn.microsoft.com/en-us/library/ms978748.aspx http://onjava.com/pub/a/onjava/2004/01/21/dbunit.html http://msdn.microsoft.com/en-us/library/bb381703(VS.80).aspx Good and Practical Ideas for Testers ,http://www.tassq.org/quarterly/docs/tassq_magazine-0609.pdf Low-Level Web App UI Test Automation, James McCaffrey http://msdn.microsoft.com/en-us/magazine/cc163723.aspx Advanced Concepts : PUT in PEX, http://research.microsoft.com/en-us/projects/pex/pexconcepts.pdf 116