Premium Essay

Junit Testing

In: Computers and Technology

Submitted By Joseph333
Words 1481
Pages 6
Introduction to Adapters
• We may have an application that needs to use libraries/a different application/you-name-it, but the thing we want to call has a different interface than our caller.  Alternative 1: Re-write the caller o Ugly, messy, error-prone (Equivalent to changing the power cable in our electrical plug when we go abroad)

 Alternative 2: Re-write the called libraries/classes o May not have the source code o As ugly and error-prone as Alternative 1

 Alternative 3: Write an adapter  The adapter converts all requests to a language the adaptee understands See http://mypages.valdosta.edu/dgibson/courses/cs4322/Lessons/Adap ter/AdapterNotes.pdf

Another example
Client class programmed against a Vendor class. Thus, the Client is strongly coupled with the Vendor class.

Later, it is decided to change vendors. Vendor2 is selected which has different method names.

Example (cont’d)
The Client must be modified in order to adapt to the new vendor.  What was the problem? The Client class encapsulates some portion of application logic, which is intertwined with the Vendor class.  This causes the strong coupling/ dependence. Thus, modifying the Client code to adapt to the new vendor could result in errors being injected into the application logic.  How do we mitigate this situation where we have a Client coded against a Vendor, where the Vendor will change?

Two helpful design principles
• Identify the aspects of your application that vary and separate them from what stays the same. • Program to an interface, not an implementation. • The first principle suggests that we separate the application logic from the code tied to the vendor. • The second design principle indicates how we may achieve that. • We program against an abstraction of all Vendor classes and then use an Adapter to encapsulate vendor specific code required to implement

Similar Documents

Premium Essay

Manager

...Technology professional with extensive background in QA engineering, Project Management and Scrum Master. • Improve software quality, meet customer expectations and reduce defects by supporting proven software quality practices and implementing practical and effective process improvement methods. • Plan and perform effective software testing through a combination of familiar structured test techniques, rapid test practices and test automation where applicable. Experience Summary: ✓ Sound Experience in Full Software Testing Life Cycle (Involvement in Test Strategy, Test cases, Test Scripts/Data, Defect tracking/prevention) and its most of phases e.g. Unit Testing, Functional Testing, Regression Testing, Integration Testing, System Testing and User Acceptance Testing, Ajax Testing. ✓ Adherence to software development life cycle, quality methodologies (ISO 9001/CMM) and best practices of software testing models (Agile Methodology). ✓ Expert in both Manual testing and Automated testing Using tools Selenium - Java. ✓ Experience in Functional & GUI testing in CRM and ERP domain. ✓ Experience in Database Testing (MySql). ✓ Successfully Participated in 32 hrs training on automation tools such as Mercury Interactive Quick Test Pro 9.2, Test Director (QC). ✓ Solid communicator with exceptional team-building skills. ✓ Strong problem-solver, design solutions and assist developers with issues. Employment History: • Over all experience...

Words: 1430 - Pages: 6

Free Essay

Software Testing Tools Survey

...designer of the Concordion Extensions API. The Concordion tool is available for free at concordion.org/Download.html. 2. What testing purpose does the tool serve? (i.e., what problem does it attempt to solve? How does it improve productivity?) Concordion is an open source tool that is used for the automation of Specification by Example. Using simple HTML, developers can create concrete examples in any specifications with certain commands. This allows for Concordion to check the examples against a real-life system. The specifications allow for complete cover of any behavior important to a customer. Based on this, specifications can be used as unit tests. Concordion specifications are also clear and readable so they can also serve as system documentation. This means a project’s specifications can be easy to understand for the development team, as well as anyone outside it. This would ultimately allow for a better maintenance of software quality as the software can be reviewed as a group effort. 5. What do you need to do in order to use the tool? There is ample documentation provided on the Concordion website to guide you through the install and configuration process. Concordion requires JDK5.0 and the following JARs in the classpath: • concordion-1.4.7.jar • junit-4.12.jar (or junit-3.8.2.jar) • hamcrest-core-1.3.jar (required for JUnit 4.11 or later) • ognl-2.6.9.jar • xom-1.2.5.jar These are all included in the download that...

Words: 1393 - Pages: 6

Premium Essay

Automated Grading

...Overview of Automated Grading Systems If bridges and buildings were made like we make software, then we would have disasters happening daily. I have heard this several times from many people. It is sad but true. Buggy software is the bane of the software industry. One of the ways of increasing software quality is by proper education. Several professionals from the software industry also attest to this. They believe that a greater emphasis should be given to quality and testing in university courses. But simply explaining the principles of software quality is not sufficient. Students tend to forget theoretical principles over time. Practical exposure and experience is equally important. Students should be put in an environment where they can appreciate the importance of quality software and can experience the benefits of processes that enhance quality. Many universities have a period of internship for the students in which they work in a software company and experience these factors first hand. However because the internship usually is of a duration of 3-6 months, it is not sufficient to instill the importance of quality. Emphasis on code quality should be made a part of the entire software curriculum for it to have proper impact. Every assignment that the students submit should be subjected to the same quality standards that an industrial project would be subjected to. Having university assignments adhere to industrial standards will result in the faculty having to spend...

Words: 2422 - Pages: 10

Premium Essay

Agile Software Testing

...An Introduction to Agile Software Testing 1 Course Objectives After this seminar, you will:  Understand what an Agile project  Know the differences between Kanban and Scrum  Understand what and how a tester performs the testing in Scrum process  Understand what testing techniques required for a tester in Agile  Know what challenges of Agile Software Testing 2 Course Content  What is an Agile Project?  What are Scrum and Kanban?  What are Scrum & Kanban Processes?  What are testing Activities in Scrum?  What are Agile Testing Techniques? 3 What is an Agile Project? All projects are “agile”, but some agile projects are more agile than others How to “agile” a project An Agile purist would point to agile manifesto and its principles Individuals and interactions over process and tools  Working SW over comprehensive documents In practice, “Agile” labeled to projects that its delivery of each increment taking no longer 4 weeks Is it met level of agility?  Customer collaboration over contract negotiation  Responding to change over following a plan 4 Agile Project An introduction of Scrum and Kanban 5 What is Scrum? Scrum in 100 words • Scrum is an agile process that allows us to focus on • • • delivering the highest business value in the shortest time. It allows us to rapidly and repeatedly inspect actual working software (every two weeks to one month). The business sets the...

Words: 3303 - Pages: 14

Premium Essay

Systems Analysis, Design, and Integration

...Table of Contents System or Application Overview 3 Brief Description 3 Intended Users 3 Project Initiator 3 Requirements Specification 4 Overall Goals 4 Requirements Gathering 4 Functional Requirements 4 Describe nonfunctional requirements 4 Functions and constraints used to frame the scope 4 Application Design 5 High Level Use Case Diagram 5 Functional Decomposition Diagram 6 Class Diagram 7 Sequence Diagram 8 Story Board 8 Test and Quality Assurance Plan 9 Unit Tests 9 System Tests 9 Acceptance Tests 10 Bug Tracking 10 Development Strategy 11 Insourcing 11 Pros 11 Cons 11 Outsourcing 11 Pros 12 Cons 12 Combination 12 Pros 12 Cons 13 Financial Analysis 13 Investment 13 Savings 13 Timing 13 Strategic Fit 13 Economic Impact 13 Operational Model 13 Cultural Fit 13 Risk Management 14 Recommendation 14 Integration and Deployment Plan 15 Work Breakdown Structure 15 References 17 System or Application Overview Brief Description This document will be used to track the Requirements, Design and Implementation of a Time Card System. This system will be used to track the time 20 different employees spend working on different projects. It will also allow managers to run reports allowing them to track time by either employee or project. Intended Users This system will be used by both employees and managers. Employees will need to clock in to the current project, clock out, and change projects...

Words: 3357 - Pages: 14

Premium Essay

Thesis

...Chapter I THE PROBLEM AND REVIEW OF RELATED LITERATURE AND STUDIES Introduction: Some schools right now, especially those with huge numbers of students who are not yet using computerized based grading system has difficulty/problems concerning the records of grades of the students. The grades are the important record to keep even for the longest time for the referral and credentials of the student to enter their next level of attaining their goals. It is the tract record that recognizes of one student, this maybe use for analyzing of your attitude and values. Manual computation is very prompt to risk for any circumstances. It is time consuming in terms of recording grades, computation using of calculator. If some records are lost, they never retrieve it in case of unexpected calamity. Accuracy and security is not been so defined. Grading System is the most commonly used in computing and analyzing the performance, talent and skills of students. It is designed to provide incentive reward for achievement and assist in identifying problems of the student. The Computerized Grading System will help both the faculty staffs and the students to have easy access on the records and past records, the easier way. The said system will also lessen the staffs on consuming too much time recording and effort locating records of the students. It will also be connected to the schools’ website (if...

Words: 6071 - Pages: 25

Free Essay

Jms Tutorial

...Development Best Practices Contents Values Principles Practices o o o o o o o o o o Testing Naming Conventions Client and Server-Side Architectural Patterns ImsCommonsUtil Database Access Dependency Injection/Inversion of Control Business (Domain) Objects GUI Refactoring Core Java Values Simplicity Use the simplest design for the current functionality; don't try to anticipate tomorrow's needs. Code should be easy for a new developer to understand (or yourself a year later). Don't optimize for performance unless there's empirical evidence that it is needed. Be wary of building or using frameworks that make the application harder to understand. If you do need a framework (e.g. Spring for dependency injection), make sure the application's business logic isn't tied to the framework in any way. Maintainability Good naming is crucial. You should be able to read the code aloud, and a person listening to you should be able to understand what the code you are reading does Put responsibilities in the right place. Enforce a clean separation of the application's layers. For example, the UI code should not know anything about the database structure. Use well-known patterns and common idioms for the language. Maintain consistency at the module, application, and team level. There's always more than one way to do something, but doing it consistently is more important than finding the absolute best way. Information Classification: Limited Access Refactor your application code aggressively...

Words: 6069 - Pages: 25

Premium Essay

Db Testing

...8/26/2004 Beyond the GUI: What You Need to Know about Database Testing Presented by: Mary R.Sweeney Exceed Technical Training & Consultation Copyright Sammamish Software Services 2003. All rights reserved. 1 Today’s complex software systems access heterogeneous data from a variety of backend databases. The intricate mix of client-server and Web-enabled database applications are extremely difficult to test productively. Testing at the data access layer is the point at which your application communicates with the database. Tests at this level are vital to improve not only your overall test strategy, but also your product’s quality. In this presentation you’ll find out what you need to know to test the SQL database engine, stored procedures, and data views. Find out how to design effective automated tests that exercise the complete database layer of your applications. You’ll learn about the most common and vexing defects related to SQL databases and the best tools available to support your testing efforts. Copyright Sammamish Software Services 2003. All rights Reserved 1 8/26/2004 The Data Access Layer Testing at the data access layer is the point at which your application communicates with the database. ! In this presentation we’ll discuss why tests at this level are vital to improve not only your overall test strategy, but also your product’s quality ! Copyright Sammamish Software Services 2003. All rights reserved. 2 How to design effective automated...

Words: 5030 - Pages: 21

Premium Essay

Medical

...MEDICAL SHOP MANAGEMENT SYSTEM A mini project submitted to the Bharathidasan University in partial fulfillment of the requirements for the award of the degree of MASTER OF COMPUTER APPLICATIONS Submitted by N.RAJA RAHINAM Register Number: 4CA104236 Under the guidance of Miss.A.Sathya, M.C.A., M.PHIL., Assistant Professor DEPARTMENT OF COMPUTER APPLICATIONS BISHOP HEBER COLLEGE (AUTONOMOUS) (Nationally Reaccredited at the A+ Level by NAAC) (Recognized by UGC as “College with Potential for Excellence”) TIRUCHIRAPPALLI-620 017 NOVEMBER – 2012 DECLARATION I hereby declare that the mini project work presented is originally done by me under the guidance of Miss.A.Sathya MCA., M.phil., Assistant Professor, Department of Computer Applications, Bishop Heber College (Autonomous), Tiruchirappalli-17 and has not been included in any other thesis/project submitted for any other degree. Name of the Candidate : N.RAJARATHINAM Register Number : 4CA104236 Batch : 2010-2013 Signature of the Candidate Miss.A.SATHYA MCA., M.PHIL.,, Assistant Professor Department of Computer Applications Bishop Heber College (Autonomous) Tiruchirappalli – 620017. Date: CERTIFICATE This is to certify that the mini project work entitled “MEDICAL SHOP MANAGEMENT SYSTEM” is a bonafide record work done by N.RAJARATHINAM, Register Number: 4CA104236 in partial fulfillment of the requirements for the award of the degree of MASTER OF COMPUTER APPLICATIONS...

Words: 2693 - Pages: 11

Premium Essay

Voices Not Heard

...Amber Jacobson M. Cook 16 November 2012 English 1301.30 E4, Persuasion Voices Not Heard Seeing the face of a helpless animal can break your heart. Many animals go through torturous testing on a day to day basis that they cannot help, nor can they defend themselves. Since Ancient Greek times, animals have been undergoing cruel and inhumane medical testing that should not be done for the benefits of the human race. Animal testing is wrong because it is cruel, costly, harmful to animals, unreliable, and outdated. Animal testing has been around since the times of the Ancient Greeks. Between seventeen million and twenty-two million animals are used for biomedical research each year (Leepson). Many believe that animals do have rights, and there are many organizations out there to trying to ensure their safety and help them get out of the horrible treatments they endure. For example, the ASPCA, American Society for the Prevention of Cruelty to Animals, has been around since 1866 trying to curb the gruesome treatment of humans to animals. The ASPCA tries to prevent the abuse and neglecting of animals around the nation. They set up shelters for animals and they give vaccines and anything else they may need. The different types of animals being tested are endless; from mice to sheep, they all serve their own purpose in the medical field. Even though these animals have helped scientist break through some medical mysteries, it is still inhumane how they have to suffer in...

Words: 1391 - Pages: 6

Premium Essay

Ethics in Psychological Research

...concepts of the ratio of the benefits and risk, and defining ethics of the use of animals in research. Animal research is a topic which is ethically sound and a concerning manner to researchers of the psychological field. There are issues of tests run on the animals which are controversial in manner and a part of the (APA) American Psychological Association ethical issue. The APA is a organization for psychologists in the United States, and designs rules and guides the profession of psychologists as well as other medical personnel. The impact of the testing of animals in the research of psychology will be included in the discussion. Ethics in Psychological Research Paper Animals in Research Ethics help guide researchers around ethical dilemmas that may arise when conducting research. Example questions would be is it acceptable to avoid telling the participant of a study as to what the researcher is looking for and testing about? In what instances is it acceptable and when is it not? The development of research ethics helps guide researchers to find the necessary answer to the different question types (Shaughnessy, Zechmeister, & Zechmeister, 2009). Conducting a scientific research is when researchers look for facts, try to prove theories, and declare the findings the truth, and those conducting research must use the ethics guidelines (Shaughnessy, Zechmeister, & Zechmeister, 2009). The research study or projects could be a loss if the start of the research begins...

Words: 1175 - Pages: 5

Premium Essay

Peta

...the organization first caught the public's attention in the summer of 1981 during what became known as the Silver Spring monkeys case, a widely publicized dispute about experiments conducted on 17 macaque monkeys inside the Institute of Behavioral Research in Silver Spring, Maryland. The group first came to public attention in 1981 during the Silver Spring monkey’s case, a dispute about experiments conducted by researcher Edward Taub on 17 macaque monkeys inside the Institute of Behavioral Research in Silver Spring, Maryland. (Eldercare Home Health, 2012) The case led to the first police raid in the United States on an animal laboratory, triggered an amendment in 1985 to the United States Animal Welfare Act, and became the first animal-testing case to be appealed to the United States Supreme Court, which upheld a Louisiana State Court ruling that denied PETA's request for custody of the monkeys. Pacheco had taken a job in May 1981 inside a primate research laboratory at the Institute, intending to gain firsthand experience of working inside an animal laboratory. Taub had been cutting sensory ganglia that supplied nerves to the monkeys' fingers, hands, arms, and legs, a process called "deafferentation" so that the monkeys could not feel them; some of the monkeys had had their entire spinal columns deafferented. He then used restraint, electric shock, and withholding of food and water to force the monkeys to use the deafferented parts...

Words: 2368 - Pages: 10

Premium Essay

Animal Testing: Pros and Cons

...Animal Testing Introduction The application of animals to test a large number of products from household compounds and cosmetics to Pharmaceutical products has been considered to be a normal strategy for many years. Laboratory animals are generally used in three primary fields: biomedical research, product security evaluation and education. (Animal Experiments) It has been estimated that approximately, 20 million animals are being used for testing and are killed annually; about 15 million of them are used to test for medication and five million for other products. Reports have been generated to indicate that about 10 percent of these animals are not being administered with painkillers. The supporters of animal rights are pressurizing government agencies to inflict severe regulations on animal research. However, such emerging criticisms of painful experimentation on animals are coupled with an increasing concern over the cost it would have on the limitation of scientific progress. (Of Cures and Creatures Great and Small) Around the world, animals are utilized to test products ranging from shampoo to new cancer drugs. Each and every medication used by humans is first tested on the animals. Animals were also applied to develop anesthetics to ease human ailments and suffering during surgery. (Animal Experiments) Currently, questions have been raised about the ethics surround animal testing. As a result several regulations have been put in place to evaluate and control the...

Words: 3584 - Pages: 15

Premium Essay

Testable Code

...How to write: Clean, Testable code Psychology of Testing (or why our intuition of testing is wrong) -- Miško Hevery http://goo.gl/V0aWx Testing is not like frosting Micro Development Model Develop Check-In Test automate Development Model Software Engineers Develop Design Testing magic QA Manual Tests Exploratory Tests Test Engineers Automated Tests Tools Testing magic Excuses Valid Excuse Legacy code-base Don’t know how I write UI “Dirties Design” No Tests Testing is for QA It doesn’t catch bugs It’s slower It’s boring Too many interfaces Hard to change Common Misconception How do you write HARD TO TEST code? Less Theory more Hands-on http://www.flickr.com/photos/doozzle/149885028/ Imaginary Interview Your mission, should you chose to accept it, is to make this code testable ● I did not say understand what it does ● I did not say write a test http://bit.ly/92Ozrz public class InboxSyncer { private static final InboxSyncer instance = new InboxSyncer(Config.get()); public static getInstance() { return instance; } private final Certificate cert; private final String username; private final String password; private long lastSync = -1; private InboxSyncer(Config config) { this.cert = DESReader.read(config.get(“cert.path”)); User user = config.getUser(); this.username = user.getUsername(); this.password = user.getPassword(); } public sync() { long syncFrom = lastSync; if (syncFrom == -1) syncFrom...

Words: 1253 - Pages: 6

Premium Essay

Resume

...OBJECTIVE To obtain a challenging growth oriented position where I can prove my worth to the Organization with my technical knowledge in a supportive environment. PROFESSIONAL EXPERIENCE |PERIOD |ORGANIZATION |DESIGNATION | |July 2007 – Till Date Technologies Limited |Senior Systems Engineer | SOFTWARE PROFICIENCY |Web Technologies  |HTML, XML | |Script |PERL Scripting,Java Scripts | |RDBMS/DBMS |Oracle 9i | |IDE’s |Eclipse, NetBeans | |Languages |C++, SQL, PL\SQL, Visual Basic and JAVA | |Operating System |Windows XP, Windows 95/98, & UNIX | |PLM/PPM Packages |Windchill/Planisware 5 ...

Words: 431 - Pages: 2