Index

image A

Acceptance testing frameworks

automated, 310

business-logic acceptance testing, 311312

exception handling, 310

formal acceptance phase, 309

goal, 309

informal acceptance phase, 309

testing with specifications and behaviors, 310

Concordion .NET, 311

FitNesse, 311

SpecFlow, 311

test scripts vs. specification, 310

Achieving desired results

common understanding, 44

archetype, 4849

detailed examples, 48

documented architecture, 47

report mockups, 47

wireframe diagrams, 4546

deliverables, 4950

positive outcomes, 5052

ruthlessly helpful practices, 37

success conditions, 39

attitude, 40, 41

awareness and acknowledgement, 39

context and preconditions, 40

developers, 39

diversions and distractions, 43

knowledge, 40, 41

learning/doing balance, 4344

out of scope, 4243

priorities, 41

project inception, 42

skill, 40, 41

team leaders, 40

trends, 5253

Application lifecycle management (ALM)

agile software development, 23

analogy, 21

analysis phase, 22

architecture phase, 22

development phase, 22, 23

inception phase, 22

operations phase, 22

Archetype, 6

benefits, 48

NerDinner application, 49

vertical slice, 49

Arrange-Act-Assert (3-As) pattern, 141142

Assembly analysis, 236

FxCop (see FxCop)

program database, 236

Assertions

classic model, 293

comparison, 293

conditional, 293

equality, 293

identity, 293

type, 293

utility, 293

constraint-based assert model, 293, 294

Automated integration testing

performance testing, 169

smoke testing, 168

stability testing, 169

Automated testing

automated integration testing, 168

performance testing, 169

smoke testing, 168

stability testing, 169

Brownfield applications, 133135

database considerations, 169170

fake, stubs and mocks, 161165

greenfield applications, 135136

model-based testing (MBT), 131

ruthlessly helpful practices, 130

security testing, 131

SLOS software, 131

surface testing, 129, 165168

test code maintainability, 136

naming conventions, 137

test method body, 141

unit testing (see Unit testing)

Aversions and biases

ambiguity effect, 320

cognitive illusions, 313

Dunning-Kruger effect, 318

focusing effect, 320321

gambler's fallacy, 319320

group-individual appraisal, 316

group-serving bias, 315

hyperbolic discounting, 321

illusory superiority, 317318

normalcy bias, 322

Ostrich effect, 319

physiological illusions, 313

Rosy retrospection, 315316

ruthlessly helpful practices, 314

status quo, 317

system justification, 317

image B

Build automation

assembly information, 193194

automated deployment, 197

build once, deploy many, 197198

deployment tools, 200

packaging tools, 198199

build tools, 174175

date and time functions, 192193

deploying, 173

import and include tasks, 188190

inline tasks, 190192

libraries and extensions, 188

logging, 183

detailed logging option, 184

file logging option, 184

FileLogger facility, 183

runner.msbuild script file, 183

verbosity options, 185

MSBuild fundamentals, 175

basic tasks, 182183

PropertyGroup and ItemGroup, 178182

tasks and targets, 176177

packaging, 173

parameters and variables, 186188

ruthlessly helpful practices, 173

XML Peek and Poke, 194195

Zip archive, 195197

image C

CI lifecycle

analysis phase, 218

full analysis, 221

goals, 219

monitoring analysis, 220221

trigger events, 219

deployment phase, 223

deliverables, 225

schematic representation, 224

target environments, 225226

triggering event, 224

packaging phase, 221

deliverables, 222

schematic representation, 222

triggering event, 222

rebuilding phase

artifacts, 214215

clean working folder, 212

goals, 209

latest source code, 212213

MSBuild configuration, 213214

schematic representation, 210

successful build, 210

triggers, 211212

stability phase, 226

automated integration testing, 226

report generation, 228

run stability test, 228

schematic representation, 227

smoke tests, 227

triggering event, 227

TeamCity project administration, 208, 209

unit testing phase, 215

artifacts, 217

failed test, 216

goals, 215

run unit tests, 217

schematic representation, 216

surface tests, 218

triggering event, 217

CI servers, 204205

CruiseControl.NET, 205206

Jenkins, 206

Team foundation server (TFS), 207

TeamCity, 206

widely-used servers, 204

Classic assertion model, 293

Code analysis

analysis phase, 231

analyze phase, 231

architecture and design, 255257

assembly analysis (see Assembly analysis)

code metrics, 257

dynamic analysis, 231, 258

code coverage, 259260

logging, 263264

performance profiling, 261

query profiling, 262

improve phase, 231

monitor phase, 231, 232

quality assurance metrics, 257258

ruthlessly helpful practices, 232

SLOS software application, 233

static analysis, 231, 235

coding standards, 236

decompiler, 246247

differencing tools, 252253

duplicate code finders, 253254

manual code review, 254

MSDN, 235

purposes, 235

source analysis, 247

source code/assemblies, 235

StyleCop (see StyleCop)

Code Analysis Tool .NET, 34

Code smells, 9799

comments, 102104

complicated source code, 104105

unused, unreachable, and dead code, 105

Code–driven testing. See Unit testing frameworks

Command-line runner. See Echo

Comparison, classic assertion, 293

Concordion .NET, 311

Conditional, classic assertion, 293

Constraint-based assert model, 293, 294

Continuous integration (CI)

lifecycle, 207209

ruthlessly helpful practices, 201

servers, 81, 204205

CruiseControl.NET, 205206

Jenkins, 206

Team Foundation Server (TFS), 207

TeamCity, 206

widely-used servers, 204

SLOS software, 203

Cyclomatic complexity (CCMax), 64

image D

Database testing frameworks, NDbUnit, 303

calling retrieve method, 307

creation of .NET DataSet schema definition file, 305

database servers, 304

features, 304

setting database state, 306307

XML data, 305, 306

Defect tracking system, 19

DotCover, 275

.NET code coverage tool. See DotCover

.NET coding standards and guidelines

calling virtual methods in constructors, 9799

disposable pattern

nested using statements, 9697

object loses scope, 9596

owns native resources and fields, 9395

exceptions

argument exceptions, 9293

catching exceptions, 90

rethrowing exceptions, 9192

swallowing exceptions, 8990

throwing exceptions, 88

publicly visible constant fields, 100101

return an empty instance, 100

sources, 87

AIOCF .NET coding standards, 87

C# coding guidelines, 87

CAT.NET rules, 87

class libraries, 88

conventions and practices, 88

FxCop rules, 88

Gendarme rules, 88

IDesign C# coding standards, 88

ReSharper code inspections, 88

zero-value enum element, 99100

.NET Practices

application lifecycle management (see Application lifecycle management (ALM))

automated testing, 15 (see also Automated testing)

code analysis, 15 (see also Code analysis)

continuous integration, 15 (see also Continuous integration (CI))

internal sources, 17

defect tracking system, 19

prospective analysis, 2021

retrospective analysis, 20

technical debt, 1819

Microsoft SDL (see Microsoft Security Development Security (SDL))

patterns and guidance, 23

dependency injection, 2728

framework design guidelines, 24

Microsoft PnP group, 2425

object-to-object mapping, 2627

presentation layer design patterns, 2526

research and development, 28

automated test generation, 2932

code contracts, 3233

ruthlessly helpful practices, 16

.NET rules and regulations

code smells, 9799

comments, 102104

complicated source code, 104105

unused, unreachable, and dead code, 105

coding standards and guidelines, 86

calling virtual methods in constructors, 9799

disposable pattern, 9397

exceptions, 8893

publicly visible constant fields, 100101

return an empty instance, 100

sources, 8788

zero-value enum element, 99100

goals, 85

ruthlessly helpful practices, 85

Dunning-Kruger effect, 318

image E

Echo, 282

Equality, classic assertion, 293

image F

FitNesse, 311

Flash, 309

Fuzzing, 33

FxCop, 235, 236

application and command-line tool, 237

brownfield applications, 238

desktop application, 237

.NET framework guidelines, 236

Financial Rewrite project, 243

FxCopCmd, 245

general options tab, 240

Lender.Slos.Financial.dll, 238242

mandatory rules, 238

mandatory rules, violations, 244

Rethrow to preserve stack detail, 242

SLOS project, 237

spelling and analysis options tab, 241

image G, H

Gallio test runner, 282

Echo, 282

execution log, 282, 283

Icarus, 282

Icarus interface, 282

Gambler's fallacy, 319320

image I, J, K

Icarus, 282

Identity, classic assertion, 293

image L

Language-integrated query (LINQ), 122

deferred query, 125126

method syntax, 123, 124

query syntax, 123

reactive extensions, 127

image M

MbUnit testing framework:, 266, 267

Microsoft All-In-One Code Framework (AIOCF), 86, 87

Microsoft patterns and practices (PnP) group, 24

Microsoft Security Development Lifecycle (SDL)

CAT.NET, 34

fuzzing, 33

MiniFuzz, 34

phases, 33

threat modeling, 33, 34

WACA, 34

Windows protection library, 34

MiniFuzz, 34

Mock object frameworks

moles framework, isolation testing, 298

automated integration testing of Import.Load method, 299300

Class-Under-Test, Import class, 298

code-generated stub type, 300

configuring Visual Studio external tool, 302

FileSystem class, external dependency, 298

ReadAllText static method, 299

test run output, 303

unit testing of Import.Load method, 301

Rhino Mocks with dynamic fake objects, 294

Arrange-Act-Assert pattern test methods, 295

generating stub repositories, 295296

interaction testing, 296297

limitations, 294

student class constructor, 295

stub/mock, 294

Moles framework, isolation testing

automated integration testing of Import.Load method, 299300

Class-Under-Test, Import class, 298

code-generated stub type, 300

configuring Visual Studio external tool, 302

FileSystem class, external dependency, 298

ReadAllText static method, 299

test run output, 303

unit testing of Import.Load method, 301

MSTest unit testing framework, 266, 267

image N

Naming conventions, 137

namespaces, 139140

Test Code, 138

test methods, 140141

tests class, 140

NerdDinner application, 49

Non-commented lines of code (NCLOC), 63

Nullable types, 114116

Null-coalescing operator, 116117

NUnit console runner, 268

configuring Visual Studio external tools, 271

nunit-console.exe program, 271

test run output, 272

NUnit GUI runner, 268

configuring Visual Studio debugger, 270

documentation, 269

nunit.exe/nunit-x86.exe, 268

tree view, 269

NUnit testing framework:, 266, 267

NUnitForms, 309

image O

Ostrich effect, 319

image P

Performance profiling, 276

Pex and Moles tools

capabilities, 29

parameterized unit tests, 30

sample code, 30

test cases, 31

Powerful C# Constructs, 107

extension methods, 108

benefits, 111

helper method approach, 109

IsWeekend Extension Method, 110

IsWeekend helper method, 109

naming conventions, 110

repeating code, 108

generics, 121122

implicitly typed local variables, 111

advantages, 114

anonymous type declaration, 112

ApplicationCollection class, 113

fallacies, 112

Process2 method, 112

Search method, 113

var keyword, 112

LINQ (see LINQ)

nullable types, 114116

null-coalesing operator, 116117

optional parameters, 117121

ruthlessly helpful practices, 108

image Q

Quantifying value, 55, 57

anecdotal evidence

automated deployments, 68

automated testing, 68

continuous integration, 68

end-users testimonials, 69

ruthlessly helpful practices, 55

sources of data, 63

qualitative data, 66, 67

quantitative data, 63, 65, 66

stakeholders value, 57

financial benefits, 57, 58

individual and team effectiveness, 61, 62

manageability, 59

quality attributes, 60

image R

Ranorex, 309

ReSharper test runner, 272

add-in, 274

and dotCover, 275, 276

code inspection, 273

context menu, 273

performance profiling, 276

refactoring functionality, 273

Unit Test Explorer window, 273, 274

Unit Test Sessions window, 274, 275

Retrospective meeting, 20

Rhino Mocks, 294

Arrange-Act-Assert pattern test methods, 295

generating stub repositories, 295296

interaction testing, 296297

limitations, 294

student class constructor, 295

Ruthlessly helpful practices

achieving desired results (see Achieving desired results)

archetype, 6

aversion and biases, 314

build automation, 173

code analysis, 232

continuous integration, 201

definition, 1

.Net practices (see .Net practices)

generally-accepted and widely-used practices, 5

improvement

balanced approach, 1112

delivery, 910

impacts, 8, 9

improvement, 1011

quality, 10

renewal, 1213

sustainability, 1314

target areas, 6

point-of-view and assertion, 2

powerful C# constructs, 108

practical application, 34

rapid development, 2

Steve McConnell's analysis, 3

triage principle, 3

valuable change, 56

image S

Silverlight, 309

Silverlight Toolkit, 309

SpecFlow, 311

Strategy

awareness, 73

Brainstorming techniques, 7475

communication, 74, 7678

conditions, 73

events, 73

failure paths, 73

monitoring, 76

patterns, 73

perception, 73

planning process, 7576

definition, 71

leverage

alert system, 83

automation, 82

CI server, 81

experience and expertise, 8384

personal process, 78

commitment to excellence, 79

effort and perseverance, 8081

virtuous discipline, 80

ruthlessly helpful practices, 72

Student Loan Origination System (SLOS) software, 131, 203, 233

StyleCop, 236, 247

code cleanup and feedback, 248

coding standards, 248

custom MSBuild task, 249251

Financial Rewrite project, 249

source code-analysis tool, 248

Surface testing, 165168

image T

Team Foundation Server (TFS), 207

Teardown method, 285

Test fixture/context, 285

Test frameworks

acceptance testing frameworks, 309

automated, 310

business-logic acceptance testing, 311312

exception handling, 310

formal acceptance phase, 309

goal, 309

informal acceptance phase, 309

testing with specifications and behaviors, 310

best practices, 265

mock object frameworks, 294

Moles framework, isolation testing, 298303

Rhino Mocks with dynamic fake objects, 294298

stub/mock, 294

NDbUnit database testing frameworks, 303

calling retrieve method, 307

creation of .NET DataSet schema definition file, 305

database servers, 304

features, 304

setting database state, 306307

XML data, 305, 306

test runners, 267

Gallio test runner, 282283

NUnit console runner, 271272

NUnit GUI runner, 268270

ReSharper test runner, 272277

test suite, 267

Visual Studio test runner, 277281

xUnit.net test runner, 283285

unit testing frameworks, 266

MbUnit, 266, 267

MSTest, 266, 267

NUnit, 266, 267

xUnit.net, 266, 267

user interface testing frameworks, 307

Flash, 309

NUnitForms, 309

Ranorex, 309

Silverlight, 309

Silverlight Toolkit, 309

web application test frameworks, 308

White, 309

Windows Forms, 309

Windows Presentation Foundation (WPF), 309

XUnit test pattern, 285294

Test method body, 141

action steps, 142144

Arrange-Act-Assert pattern, 141142

helper methods, 151152

primary assertion, 144145

secondary assertions, 145147

short method, 142

TestCase attributes, 152154

Tests Context Class, 148151

var keyword, 147148

Test runners, 267

Gallio test runner, 282283

NUnit console runner, 271272

NUnit GUI runner, 268270

ReSharper test runner, 272277

test suite, 267

Visual Studio test runner, 277281

xUnit.net test runner, 283285

Test suite, 267

Type, classic assertion, 293

Typemock Isolator mock object framework, 303

image U

Unit test runners

multiple test frameworks

DevExpress, 277

ReSharper, 277

TestDriven.NET, 277

performance profiling, 276

Unit testing

boundary analysis, 157158

explicit preconditions, 160161

invalid arguments, 158160

Test Code, 154

Unit testing frameworks, 266

MbUnit, 267

MSTest, 267

NUnit, 267

xUnit.net, 267

User interface (UI) prototypes, 45

User interface (UI) testing frameworks

Flash, 309

NUnitForms, 309

Ranorex, 309

Silverlight, 309

Silverlight Toolkit, 309

web application test frameworks, 308

automated, 308

browser automation, 308

Lightweight Test Automation Framework, 308

Selenium, 308

WatiN, 308

White, 309

Windows Forms, 309

Windows Presentation Foundation (WPF), 309

Utility, classic assertion, 293

image V

Visual Studio test runner, 277

code coverage, 280

Code Coverage Detail window, 281

Code Coverage Results window, 281

main menu, 277

Test Results window, 278, 279

Test View window, 278

image W

Web Application Configuration Analyzer, 34

Web application test frameworks, 308

automated, 308

browser automation, 308

Lightweight Test Automation Framework, 308

Selenium, 308

WatiN, 308

White, 309

Windows Forms, 309

Windows GUI. See Icarus

Windows Presentation Foundation (WPF), 309

image X, Y, Z

xUnit test frameworks. See Unit testing frameworks

XUnit test pattern

assertions, 292

classic model, 293

constraint-based assert model, 293, 294

FixtureSetup method, 289

FixtureTeardown method, 289

identifying fixture setup and teardown methods, 287

identifying test class and fixture, 286, 287

identifying test method, 285, 286

teardown method, 285

test fixture/context, 285

using NUnit test framework, 287288

using Visual Studio test framework, 290292

XUnit.net test runner, 283

console runner, 284

GUI, 284

lean framework, 283

test run output, 285

xUnit.net unit testing framework, 266, 267

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.57.164