I've created a block view, which I've positioned on the page using the admin UI. I've exported my view using Features and fe_block for its block.

I'd like to write a SimpleTest to verify that content from the view is displaying on the front page.

I've written a test that creates some nodes (of the type being displayed by the view), then does a drupalGet('/') and some assertText() statements to verify the content is displayed.

However, these are currently failing. When I view the HTML of the frontpage as seen by SimpleTest, the view isn't there.

Have I missed something? Is there a better way to be testing this?

1 Answer 1


The simpletest code needs to place the block into a region. Then, you should see the content after doing the drupalGet('/').

  • The block positioning is already specified in the feature exported by fe_block Commented Sep 8, 2014 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.