17

Click here to load reader

Creating parallel tests for NUnit with PNUnit - hands on lab

Embed Size (px)

Citation preview

Page 1: Creating parallel tests for NUnit with PNUnit - hands on lab

Creating parallel tests for NUnit with PNUnit

Hands on lab

pablo santos luaces

Page 2: Creating parallel tests for NUnit with PNUnit - hands on lab

The history of PNUnit• Back in 2005, December• We needed a way to test our server + our client

• We wanted to automate the CLI

Page 3: Creating parallel tests for NUnit with PNUnit - hands on lab

Our testing system

Page 4: Creating parallel tests for NUnit with PNUnit - hands on lab

Nunit and GUI were fine…• We were using Nunit• We were using Automated QA Test Complete (Now Smart Bear)

• But we needed something to automate the CLI…

Page 5: Creating parallel tests for NUnit with PNUnit - hands on lab

What we needed…

Page 6: Creating parallel tests for NUnit with PNUnit - hands on lab

So we need to..• Wait till the server is up and running

• Then start launching commands…

Page 7: Creating parallel tests for NUnit with PNUnit - hands on lab

But we wanted more…• The basic sample is client and server on the same machine

• BUT, we wanted more!

Page 8: Creating parallel tests for NUnit with PNUnit - hands on lab

Multiple OSServer• Windows (XP, 2000, 2003, 2008, Vista, 7)

• Linux (several flavors)

• Mac OS X• Solaris!

Client• Windows• Linux• Mac OS X• Solaris

And combinations between the two!!

Page 9: Creating parallel tests for NUnit with PNUnit - hands on lab

Plus multiple backends…• Server running with• SQL Server• MySQL• Firebird• SQLite• Postgresql…

Page 10: Creating parallel tests for NUnit with PNUnit - hands on lab

So…• We needed a «networked» way to sync client and servers (server start up might vary)

• But we wanted more ;)

Page 11: Creating parallel tests for NUnit with PNUnit - hands on lab

What about more complex tests?• Stuff like: two clients start and one wait for the other to do something…

• We needed sync mechanims…

Page 12: Creating parallel tests for NUnit with PNUnit - hands on lab

Barriers• The very basic sync mechanism is the barrier: you create a barrier, and then each test must «hit it» before going forward!

Page 13: Creating parallel tests for NUnit with PNUnit - hands on lab

PNUnit structure

Page 14: Creating parallel tests for NUnit with PNUnit - hands on lab

And we also use it for cluster testing!!!

Page 15: Creating parallel tests for NUnit with PNUnit - hands on lab

And we use it extensively• Run a basic suite once each task is closed

• Run the entire suite (on several vmachines) each time we create a release

Page 16: Creating parallel tests for NUnit with PNUnit - hands on lab

…and here we go

Page 17: Creating parallel tests for NUnit with PNUnit - hands on lab

Go for PNUnit!!!