610 likes | 842 Views
CASE Tools. To help with software quality Peter Behl Cody Calhoun Brent Carlovsky Jake Markwardt. Overview. History 3 rd party tools ReSharper Junit Analyst4j Rose C++ Repositories Automatic Code generation. History 1968. Information System Design and Optimization System(ISDOS)
E N D
CASE Tools To help with software quality Peter Behl Cody Calhoun Brent Carlovsky Jake Markwardt
Overview • History • 3rd party tools • ReSharper • Junit • Analyst4j • Rose C++ • Repositories • Automatic Code generation
History 1968 • Information System Design and Optimization System(ISDOS) • Sparked interest in the concept of computer aided analysis and processing • Problem Statement Language/Problem Statement Analyzer(PSL/PSA) tool • Created by Daniel Teichroew • First “CASE tool” although it predated the term
History 1980s • “CASE” coined by Nastec Corporation • GraphiText – original graphics and text editor • DesignAid – successor to GraphiText • First tool to logically evaluate software and design diagrams • Text Editors • Used to key in text and track document versions • Increased Efficiency
Early CASE tools cont. • Developed to developers to edit diagrams and designs • Quick Drafting • Easy Modifications • Improvement to CASE tools • Data dictionaries stored details of all data types and processes • Graphic Tools
Early CASE tools cont. • Developed to automatically test software • Reduced time needed in the testing phase • Integrated CASE tools • Developed to counteract problems with tools integrating together • Grouped similar tools together • Outcome: CASE workbenches and environments
CASE tools 1990s • Improvements to components • Component reusability became extremely important • CASE tools responded by being able to produce reusable components • Improvements to interface • “Friendlier” user interface introduced to make learning the tools easier • Also led to more involvement with end users
CASE tools cont. • Improvements to project management tools • Life-Cycle tools • Tools that can be used at any development stage • Time Scheduling Tools • Cost Calculators • Made some important resources easy to predict • Time required, cost, etc.
What is it? • ReSharper is a CASE tool that helps with: • Code inspection • Automated code refactoring • Code smells • Error detection
What can ReSharper do? • Code Analysis • Code Assistance • Refactoring • Code Generation • Code Cleanup • Unit Testing • Internationalization • Many more!
Code Analysis • Uses over 1300 inspections to analyze code • Can detect code issues • Errors • Code smells • Redundancies
Code Analysis • Code smells detection • Suggestions
Coding Assistance • Gives helpful hints while coding • Highlight matching delimiters
Refactoring • Changing method signatures
Refactoring • Introduce new variables old new
Code Generation • Can create new methods for you!
Code Cleanup • Auto formatting • Redundancy removal • User specific coding conventions
Unit Testing • Method creation • Separate test sessions • Performance test • Dot trace plugin
Internationalization • Detection of localizable items
What is it? • Junit is a Unit testing framework for the Java Programming Language. • Unit tests target smaller portions of code (methods and classes)
Why should you Unit Test? • Refactoring without worries- run tests after to make sure everything still functions as intended • Unit tests tell you exactly what’s broken • You can run the unit tests whenever you want to. • The test are documentation
Creating Unit Tests in Netbeans • Right Click on The class you want to write a test for choosetools->Create Tests
Creating Unit Tests in Netbeans • Select your code generation options and JUnit version.
Creating Unit Tests in Netbeans • Netbeans will generate a test file complete with methods to test all of your code.
Writing your own tests • AssertEquals(val1, val2); Checks that two objects are equal • AssertTrue(val1 < val2); checks that a condition is true • Assertfalse(val1 > val2); checks that a condition is false Use Assert to test you methods.
Running your tests • Right Click on your test file and Run file
Testing Results • Shows all of the methods in your test file.
What is it? • Tool used to automate software measurement in OO languages • Identifies antipatterns quickly • Blob classes • Spaghetti code • Estimates the testing efforts for code • Custom user queries and analysis
What can Analyst4j do? • OO metrics • Complexity metrics • Maintainability metrics • Code metrics • Graph based analysis • Comparison • Distribution • Custom analysis
OO Metrics • Object complexity • Cohesive method rankings • Coupling between objects • Depth of inheritance • Number of children
Complexity Metrics • Logical complexity • Structural complexity • Provides early warnings if complexity will effect system maintainability
Code Metrics • Method level • LOC • % of comments • # of variables • # of unused variables • # of parameters • # of unused parameters • Class Level • LOC • Number of parents • Total # of fields • % private field/% public • # of inner classes • File Level • LOC • Halstead Effort • Maintainability Index • Package Level • LOC • # of classes • # of interfaces • # of files
Graphed Based Analysis • Can identify outliers
What is it? • Rose C++ Analyzer is a rational rose tool used to reverse engineer code back into class diagrams. • Can also be used to create more in depth models, which contain category (.cat) or subsystem (.sub) files.
Why use C++ Analyzer? • Many Projects don’t start from scratch anymore. • Can be used to create an initial class diagram from the base “copied” code. • Can be used to create a class diagram for an old system, whether it was created before UML or if it was implemented before a company adopted UML. • Can be used to “recover” a class diagram if the original is lost.
Why use C++ Analyzer? (cont.) • Can create subsystems or categories in a pre-existing class diagram.
Initial Setup Required • In order for this to work, you need to do a little bit of background work first. • http://www-01.ibm.com/support/docview.wss?uid=swg21205504 • Because it is an old system, the reengineering itself is kind of out of date now
Unfortunately… • Getting this to work requires you to edit the Rose home directory on a computer. • What it should have looked like:
Not just Rose! • There are several other pieces of software created for this as well: • StarUML(for Java projects) • Eclipse UML plugins • Microsoft Visio • IBM Rapshody/Rational Software Architect • And many more