Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add button to run all tests exactly like they are run in a deployment #112

Open
jesperkristensen opened this issue Dec 21, 2016 · 0 comments

Comments

@jesperkristensen
Copy link
Collaborator

It can currently be done in the API explorer using:

Type: SOAP
API: Metadata
Body:

    <deploy>
      <zipFile>UEsDBAoAAAAAAE5PlUkAAAAAAAAAAAAAAAALAAAAdW5wYWNrYWdlZC9QSwMECgAAAAAATk+VSfcIsaqAAAAAgAAAABYAAAB1bnBhY2thZ2VkL3BhY2thZ2UueG1sPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48UGFja2FnZSB4bWxucz0iaHR0cDovL3NvYXAuc2ZvcmNlLmNvbS8yMDA2LzA0L21ldGFkYXRhIj48dmVyc2lvbj4zOC4wPC92ZXJzaW9uPjwvUGFja2FnZT5QSwECFAAKAAAAAABOT5VJAAAAAAAAAAAAAAAACwAAAAAAAAAAABAAAAAAAAAAdW5wYWNrYWdlZC9QSwECFAAKAAAAAABOT5VJ9wixqoAAAACAAAAAFgAAAAAAAAAAAAAAAAApAAAAdW5wYWNrYWdlZC9wYWNrYWdlLnhtbFBLBQYAAAAAAgACAH0AAADdAAAAAAA=</zipFile>
      <deployOptions>
        <checkOnly>true</checkOnly>
        <testLevel>RunLocalTests</testLevel>
      </deployOptions>
    </deploy>

I created the zip in Node.js using:

    var JSZip = require("jszip");
    var zip = new JSZip();
    var xml = '<?xml version="1.0" encoding="UTF-8"?><Package xmlns="http://soap.sforce.com/2006/04/metadata"><version>38.0</version></Package>';
    var data = new Buffer(xml, "utf8");
    zip.file("unpackaged/package.xml", data);
    let zipFile = Buffer.from(zip.generate({type: "arraybuffer"}));
    console.log(zipFile.toString("base64"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant