Taking screenshot from Camera in Editor

I am trying to take screenshots from a camera in the Editor.
I tried to take a simple screenshot from the actual view like this.

[MenuItem("Screenshot/Take screenshot")]
static void Screenshot()
{
	Application.CaptureScreenshot("test.png");
}

But this is not working…
To go further, how can I take a screenshot from a camera ?

Thanks a lot.

Are you sure it did nothing?

The default path when in the editor is the project folder and not the Assets folder. Check the project folder for the test.png file. Also make sure when you take the screenshot that the Game view is visible, because if not there is no source to take the screenshot from.

You may use Renderator to make screenshots/animation with them, here is topic:
http://forum.unity3d.com/threads/renderator.381844/