《LabVIEW软件工程动手课程 (英文)》由会员分享,可在线阅读,更多相关《LabVIEW软件工程动手课程 (英文)(44页珍藏版)》请在金锄头文库上搜索。
1、LabVIEW开发技术丛书LabVIEW软件工程动手课程LabVIEW Software Engineering Hands-On Exercises Elijah Kerry, LabVIEW Product Manager Please send any mistakes, corrections or suggestions found in this Beta version of the guide to 1 CONTENTS Introduction To Software Engineering . 2 Software Configuration Management . 3
2、 Exercise: Tracking Changes to VIs Using Source Code Control . 4 Performing Code Reviews . 11 Exercise: Analyzing Code Quality . 12 Advanced Debugging and Dynamic Code Analysis . 17 Exercise: Debugging Unexpected Behavior . 18 Part 1: Trace an Example in the Development Environment . 19 Part 2: Trac
3、e an Executable . 25 Testing and Validation . 29 Exercise: Unit Testing and Validation of Code . 30 Optional Exercise: Finding Un-Covered Code . 38 More Information . 42 2 INTRODUCTION TO SOFTWARE ENGINEERING National Instruments LabVIEW is a complete programming language, suitable for handling the
4、biggest and most complex applications that engineers and scientists face today. In particular, programmers creating mission-critical applications embedded control applications, industrial monitoring applications, and high-performance test systems cannot afford to introduce errors or uncertainty into
5、 the system. For these kinds of applications, a very structured, and in some cases externally certified, programming process must be followed to ensure quality and repeatability of the code developed. Software engineering typically refers to a regimented and procedural methodology for developing sof
6、tware. As software has gotten more complex and team sizes have grown, various software engineering process models have evolved to encourage efficient development that ensures quality, follows timelines, and meets the expectations of the end-user. This guide will examine the development life-cycle an
7、d explain some of the tools that can improve and automate common software engineering practices. 3 SOFTWARE CONFIGURATION MANAGEMENT Many developers have experienced the frustration of unmanaged environments, where people overwrite each others changes or are unable to track revisions. Managing a lar
8、ge number of files or multiple developers is a challenge in any language. In fact, its often a challenge to manage an application even if its just one developer working on a small to medium application. Large development projects rely upon configuration management tools to satisfy the following goal
9、s: 1. Define a central repository of code 2. Manage multiple developers 3. Detection and resolution of code collisions 4. Tracking behavioral changes 5. Identification of changes are who made them 6. Ensuring everyone has latest copy of code 7. Backing up old code versions 8. Managing all files, not
10、 just source code Perhaps the most important and commonly known SCM tool is source code control (SCC). However, in addition to many third party SCC tools, well see that there are a number of additional tools available in the LabVIEW development environment that is designed to help with these goals.
11、Establishing guidelines for storing and managing files requires foresight into how the application will be structured, how functionality will be divided, and the types of files beyond source code that will be important to keep track of. Devote time to making decisions about how functionality will be divided among code and to working with developers on file storage locations and the additional files or