Book Image

Learning Apex Programming

5 (1)
Book Image

Learning Apex Programming

5 (1)

Overview of this book

Table of Contents (17 chapters)
Learning Apex Programming
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Fruits of our labour


We can run the tests in our organization in several ways through the UI or through Eclipse. To run the tests through the UI, perform the following steps:

  1. Navigate to Setup | Develop | Apex Test Execution.

  2. Click on the Select Tests button.

  3. Select which tests you wish to run as follows:

  4. Click on Run.

The results of the tests will be shown on the following page:

That's about the UI, and as for Eclipse, you would right-click on the folder (or a specific test class), select Force.com, and then select the Run Tests option, as shown in the following screenshot:

The results of Eclipse test runs are displayed in the Apex Test Runner view. If you do not see it, it should open automatically for you when you run a test. Otherwise, you can navigate to Window | Show View | Apex Test Runner. The results appear as follows:

You might notice that Eclipse displays a green check next to all classes that are above 75 percent test coverage as well as a debug log of all methods run in the right pane...