+ Start a Discussion

Force.com IDE missing Run Tests option

This may not be the appropriate place to ask this question but I don't know if there is a discussion board about the force.com IDE. The problem I'm having is that the force.com IDE I just downloaded and installed is missing the Run Tests option. The docs I find about running tests all say to right click on a test class and then go to Force.com > Run Tests. Unfortunately the Run Tests option is missing.


Does have any suggestions for fixing this problem?


Thank you


Is your Eclipse Perspective open under Force.com?


I don't know how to check if it is. I downloaded the stand-alone force.com IDE. Isn't this different from Eclipse?


Sort of, but yea it should only have the Force.com perspective.


You can also go to the class on tyour org and click 'Run Tests' there.


You mean I can also run the tests from the web interface. I am aware of this but it's not what I want. I am trying to learn how to use the IDE and need to be able to run the tests from the IDE. Is there something wrong with the IDE which is causing the Run Tests option to not show up?


Is your class marked on top as



private class classname



If so... then I have no idea.  It should be there.


Yes, I do have @isTest above the class name. The IDE created this class when I went to New > Apex Class and then chose Template > Test Class. I'm following the Workbook which uses the Warehouse example as the project.


Here is the test class code.

 * This class contains unit tests for validating the behavior of Apex classes
 * and triggers.
 * Unit tests are class methods that verify whether a particular piece
 * of code is working properly. Unit test methods take no arguments,
 * commit no data to the database, and are flagged with the testMethod
 * keyword in the method definition.
 * All test methods in an organization are executed whenever Apex code is deployed
 * to a production organization to confirm correctness, ensure code
 * coverage, and prevent regressions. All Apex classes are
 * required to have at least 75% code coverage in order to be deployed
 * to a production organization. In addition, all triggers must have some code coverage.
 * The @isTest class annotation indicates this class only contains test
 * methods. Classes defined with the @isTest annotation do not count against
 * the organization size limit for all Apex scripts.
 * See the Apex Language Reference for more information about Testing and Code Coverage.
private class TestMerchandise {

    static testMethod void testPriceChange() {
        Invoice_Statement__c invoice = new Invoice_Statement__c(Status__c = 'Negotiating');
        insert invoice;
        Merchandise__c[] products = new Merchandise__c[] {
        	new Merchandise__c(Name='item 1', Description__c = 'test product 1', Price__c = 10, Total_Inventory__c = 10),
        	new Merchandise__c(Name='item 2', Description__c = 'test product 2', Price__c = 11, Total_Inventory__c = 10)
        insert products;
        Line_Item__c[] lineItems = new Line_Item__c[] {
			new Line_Item__c(Invoice_Statement__c = invoice.id, Merchandise__c = products[0].id, Unit_Price__c = 10, Units_Sold__c = 3),
			new Line_Item__c(Invoice_Statement__c = invoice.id, Merchandise__c = products[1].id, Unit_Price__c = 11, Units_Sold__c = 6)
		insert lineItems;
		products[0].price__c = 20; // raise price 
		products[1].price__c = 5;  // lower price 
		update products;
		lineItems = [SELECT id, unit_price__c FROM Line_Item__c WHERE id IN :lineItems];
		System.assert(lineItems[0].unit_price__c == 10);  // unchanged 
		System.assert(lineItems[1].unit_price__c == 5);   // changed!!



Funny thing, I have the EXACT same problem right now.


All of my test code that used to work on the full edition of Eclipse with Force.com nature, I can no longer run anymore in Force IDE because the Run Tests option is no longer available when I right click my test classes and go to Force.com 


My only options available are:


Refresh from Server

Save to Server

Synchronize with Server

Deploy to Server....


I have the same @isTest at the top of my code, I would also appreciate help on this issue.


Did anyone find a resolution top this bizarre thing. I just installed the IDE and am in the same boat. Thanks,

Vinod TomarVinod Tomar

I am also having the same issue.

Vinod TomarVinod Tomar

Please close the IDE. Remove below line from config.ini file, open IDE again then "Run Test" option would be displayed. I tested this.





config.ini file can be found on this location-


C:\Program Files\salesforce.com\Force.com IDE\configuration


I can confirm Vinod's fix worked for me! Can anyone explain how it works?

Brenner SpearBrenner Spear
I don't have this file, but I have the Force.com IDE installed
Pavan VPavan V
There is a new way of running tests in Force.com IDE. Please check this link https://developer.salesforce.com/docs/atlas.en-us.200.0.eclipse.meta/eclipse/runTests.htm
Richard DiNardo 6Richard DiNardo 6
So I see the Run Configurations but my search buttons are always ghosted out and the run tests option never appears anywhere. I feel like my eclipse install for force.com ide is missing something
Mikolaj WasowskiMikolaj Wasowski
@richard: Late reply, but make sure you first select the proper project from the "Project" tab. That should allow you to search for the test class.
Bala Kumar Sevanan 2Bala Kumar Sevanan 2
Go to windows-->perpective-->open Perspecitve-->click on others--> and choose Force.com. You can see the Test run in Run Tab
User-added image