Skip to content

Instantly share code, notes, and snippets.

@brettbatie
Last active August 29, 2015 14:21
Show Gist options
  • Save brettbatie/1ab1334bc4fc2939bb3f to your computer and use it in GitHub Desktop.
Save brettbatie/1ab1334bc4fc2939bb3f to your computer and use it in GitHub Desktop.
Use Command line MavensMate to create many apex files at once (helps with unit test limit of 500)
for i in {1..100}; do echo '{"params": {"api_name": "unittest'"$i"'"}, "project_name": "release-1.7", "workspace": "/home/brett/git/salesforce", "metadata_type": "ApexClass", "github_template": {"params": [{"name": "api_name", "default": "MyApexClass", "description": "Apex Class API Name"}], "name": "Unit Test", "file_name": "UnitTestApexClass.cls", "author": "MavensMate", "description": "Unit test class"}}' | /usr/local/bin/mm -o new_metadata -c SUBLIME_TEXT_3; done;
@brettbatie
Copy link
Author

Delete a bunch of apex files at once with:

for i in {1..200}; do echo '{"project_name": "release-1.7", "files": ["/home/brett/git/salesforce/release-1.7/src/classes/unittest'"$i"'.cls"], "workspace": "/home/brett/git/salesforce"}' | /usr/local/bin/mm -o delete -c SUBLIME_TEXT_3; done;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment