How does one use the Aura Test class to test Lightning Components?

By scrolling through the Lightning Reference, I’ve found that there’s an Aura Javascript API class called Test. You can find the API docs at

The docs are…sparse to say the least. The documentation for the Aura open source framework seems to say you can create a MyComponentTest.js file in your component bundle with tests, but no tool I can find successfully deploys a test class to Salesforce.

Is there a way to write test classes into my Controller that are called when certain events fire? Or are we stuck waiting for Salesforce to support this aspect of Aura?


This functionality has not been exposed yet. The Aura framework supports it just fine, but getting that wired into the Dev Tools for Lightning in Salesforce is a bit more involved.

Source : Link , Question Author : Christian Carter , Answer Author : Kris Gray

Leave a Comment