Table of Contents

Preface

Chapter 1:

Why TestCafe?

Introducing TestCafe10

Exploring the main features of TestCafe11

Introducing TestCafe Studio12

Comparing TestCafe and Selenium13

Reviewing the test project we will build15

Selecting a test application15

Writing test cases16

Summary27

Chapter 2:

Exploring TestCafe Under the Hood

Scouting the TestCafe architecture30

The server side31

The client side31

Learning about the TestCafe API33

Elements selection33

Assertions40

User roles43

Executing custom client-side code44

Summary46

Chapter 3:

Setting Up the Environment

Technical requirements47

Setting up the test project environment48

Installing Node.js48

Installing TestCafe49

Creating the test project configuration file50

Accepting code styling convention50

Exploring the configuration settings51

Creating a basic configuration for the test project61

Structuring the test code62

Fixtures62

Tests63

The starting web page63

Metadata64

Skipping tests65

Summary66

Chapter 4:

Building a Test Suite with TestCafe

Technical requirements70

Creating a test70

Running the test72

Performing actions73

Debugging the tests73

Debugging tests in TestCafe74

Debugging tests in Chrome Developer Tools77

Writing the test project log in tests79

Adding verifications to the test project83

Adding assertion for the user creation test83

Adding assertion for the log in test84

Adding the log out test84

Adding custom code execution to the test project85

Adding more tests88

Adding the new issue creation test88

Adding the new issue is displayed on a project page test90

Adding the issue editing test92

Adding the updated issue is displayed on a project page test95

Adding the issue searching test97

Adding the issue deletion test99

Adding the file uploading test101

Adding the file deletion test104

Summary106

Chapter 5:

Improving the Tests

Technical requirements107

Executing selected tests108

Exploring test setup and teardown110

Running tests with command-line settings120

Summary124

Chapter 6:

Refactoring with PageObjects

Technical requirements125

Adding a Role for logging in126

Chapter 7:

Findings from TestCafe

Technical requirements139

Taking a final step with test functions140

Exploring TestCafe development and future plans149

Additional references to useful resources150

Summary151

Other Books You May Enjoy

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

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