Just wrote my first Visualforce page in Sandbox. How do I write a test for VF pages using standard controller on Cases?

  • Per our Twitter discussion, take a stab at writing a test for your controller extension, using this thread as a starting point, and post your extension & test-class-in-progress here if you get stuck. Commented Oct 28, 2016 at 22:51
  • Rachel. If you don't have an apex controller you don't have to write tests. Commented Oct 29, 2016 at 12:40

1 Answer 1


If you have no extensions, then your page does not require any unit tests. In other words, if your page starts off like this:

<apex:page standardController="SomeObject">
    <!-- rest of code -->

Then there's nothing to unit test, and you can freely deploy it to production without writing any unit tests. Unit tests are only for Apex Code.

Not the answer you're looking for? Browse other questions tagged .