Giter VIP home page Giter VIP logo

sfdc_api's Introduction

SFDC SOAP API

A Soap API that I tried to make independant that can be plugged into a project if needed

Background

So initially I was working in test automation using Selenium to automate the browser, a way we initially had this was Use the CLI Dataloader to load spreadsheets into the test org .. run the selenium scripts .. then delete the data .. This was painfull ... so instead I looked at the API and utilizing this and it now seems to be great for our test automation..

We can quickly spin up a test script with or without the browser ..perform the test .. then perform asserts... or even assert ..loads into salesforce .. Which then fire triggers and assert that they are set to what we are expecting.. Not sure if its usefull for anyone but might be handy for some ..

Getting Started

What things you need to install the software and how to install them

  • Maven

Installing

So I tried to make this a plugin for any maven project so hopefully all you should need to do is add this repo as a module to your project

Also be sure to run the install-jar.bat file under the lib folder this installs the partner api which gives us the generic api objects

And away you go !

Using in test script

Example - Can be found here

private static SaveResult[] result ; 
	@Before
	public  void setUp() {
		SObject account = new SObject("Account") ;
		account.setSObjectField("Name", "Test Account ");
		account.setSObjectField("RecordTypeId", RecordTypes.getId("Account", "Broker"));
		result = PartnerSession.insert(new SObject[] {account}) ; 
		
	}
	
	@Test
	public  void doingTestingStuff(){
		
		System.out.println(result[0].getId());
	}
	@After
	public void tearDown(){ //removing the data after the test has finished this can be implemented differently if needed 
		for(SaveResult record : result) {
			PartnerSession.delete(new String[]{record.getId()}) ; 
		}
	}

Built With

sfdc_api's People

Contributors

sachinas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.