没有合适的资源?快使用搜索试试~ 我知道了~
首页testing in scala
Testing in Scala starts with an introduction of the Scala programming language, explains why project infrastructure is critical, and provides compelling reasons to use Scala testing frameworks to not only test Scala code, but Java code too. This book introduces and explains the Simple Build Tool, the Scala answer to Ant, Maven, Gradle, and Buildr. It then explains in detail all the best tools for testing Scala and Java code today--ScalaTest, Specs2, ScalaCheck, and Borachio. Testing in Scala also gives insight on how to integrate coverage tools, continuous integration, web acceptance frameworks, and Java testing frameworks that you already know and love.
资源详情
资源评论
资源推荐

ISBN: 978-1-449-31511-5
[LSI]
Testing in Scala
by Daniel Hinojosa
Copyright © 2013 Daniel Hinojosa. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/
institutional sales department: 800-998-9938 or corporate@oreilly.com.
Editors: Andy Oram and Maria Gulick
Production Editor: Christopher Hearse
Copyeditor: Rebecca Freed
Cover Designer: Randy Comer
Interior Designer: David Futato
Illustrator: Rebecca Demarest
January 2013: First Edition
Revision History for the First Edition:
2013-01-23 First release
See http://oreilly.com/catalog/errata.csp?isbn=9781449315115 for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly
Media, Inc. Testing in Scala, the image of Bailey’s Shrew, and related trade dress are trademarks of O’Reilly
Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trade‐
mark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information contained
herein.
www.it-ebooks.info

Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1.
Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Setup in Mac OS X, Mac OS X Lion, and Linux 1
Setup in Windows 1
Using SBT 2
SBT Folder Organization 3
The Build File 3
About Our Examples 4
Creating Our Examples Using TDD, ScalaTest, and SBT 5
2.
Structure and Configuration of Simple Build Tool (SBT). . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Directories in SBT 9
The Importance of Good Infrastructure 10
Triggered Executions 11
What If I Need an Extra Repository? 13
Format of Dependencies Line 13
Updating Changes from the Build File 14
Bringing Some Sources and Documentation 14
Running SBT 15
From the Shell 15
Interactive Mode 15
Basic Tasks 16
Using the Scala Interpreter 17
Knowing Your History 18
Conclusion 19
3.
ScalaTest. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Setting up ScalaTest in SBT 22
Matchers 23
iii
www.it-ebooks.info
剩余164页未读,继续阅读

















安全验证
文档复制为VIP权益,开通VIP直接复制

评论3