Sugar 7 test tools now available!

Matthew Marum —  July 27, 2015 — 18 Comments

Do you write unit tests for your Sugar customizations?

Do you performance test your Sugar on-site deployments?

Every developer knows they should be building unit tests and performance tests but sometimes it is just too hard to get started from nothing.  Well now SugarCRM Engineering is going to make it easy for you!

The Sugar 7 unit test suite and performance test frameworks that we use to develop Sugar 7 are now available to current customers and partners via Github!

This is the first release in a new effort to provide enhanced standardized development tooling and automation to the Sugar Developer community.

At this time, we are only releasing these tools to existing Sugar Customers and Sugar Partners.  So these private Github repositories require that you are logged in using your Github account in order to access them.  You may also need to request access from SugarCRM if you cannot access these repositories currently.

In the coming weeks, we will be posting step-by-step tutorials for creating Sugar 7 unit tests and custom JMeter scenarios. So stay tuned!

More details below.

Sugar 7.x Unit Test repository

Our JavaScript unit tests are built using Jasmine.  Our PHP unit tests were built using PHPUnit.

https://github.com/sugarcrm/unit-tests

Check out the README for getting tests installed and running in your development environment.  We also have a short NEW_TESTS guide that will help guide you in creating your own unit tests.

Sugar 7.x Performance Test repository

Additionally, we are making available the Apache JMeter based performance test framework for load testing your Sugar 7 on-site deployments.

https://github.com/sugarcrm/performance

Check out the README for getting your development environment setup and for running the existing JMeter scenarios.  You can adapt our stock JMeter scenarios to create your own test scenarios.

Requesting Access

Some partner developers will find that they already have access to the above repositories.  However, if you get a 404 screen when you click the links above then you do not yet have access.

If you are a current Sugar Customer or Sugar Partner, please request access here.

Again, you can only get access to these repositories at this time if you work for a current Sugar Customer or Sugar Partner.

Any questions/concerns/accolades can be e-mailed to developers@sugarcrm.com.

Matthew Marum

Posts

Matt is the Director of Developer Advocacy for SugarCRM. Previously he was an Engineer on Sugar 7 and a Solutions Architect for the OEM program. He is also an avid trail runner, Boston Marathon qualifier and a karaoke aficionado.

18 responses to Sugar 7 test tools now available!

  1. 

    I hope you guys will also make it available for non-partner. 😦

    • 
      Matthew Marum July 29, 2015 at 3:59 pm

      This is available for Sugar 7 Customers as well as Sugar Partners. So you don’t have to be a partner, but you do need to be at least a customer. We are exploring making parts of these suites open source.

  2. 

    my company is thinking about using functional testing with selenium.. if i remember well you used it before 7.0.. right? is it still integrated someway? for bwc testing maybe..?

    • 
      Matthew Marum July 31, 2015 at 3:26 pm

      Yes, we have GUI automation frameworks that use Selenium underneath. For example, we’ve been doing some significant work with CucumberJS with a Selenium webdriver.

      • 

        is or will it be accessible for us somewhere (i tried to search for cucumber or selenium inside this repo https://github.com/sugarcrm/unit-tests.git but i couldn’t find anything related..) so we could add our customer specific test to the existing framework and test our customizations and the standard test together..

        • 

          It’s not yet accessible. We have a couple different frameworks for GUI automation that people are still building out internally. I’d like to make sure that the final framework provided as a recommendation to our community is the right one.

      • 

        Hi, Matthew. It is recognized some kind of issue testing bwc modules with selenium webdriver? Concretly when selenium webdriver tries to find elements inside of an iframe in some bwc module. Apparently there is some problem with that.

        • 

          Kuxti,

          I’m the functional testing automation lead at SugarCRM, so I’ll field this one. We use Selenium WebDriver extensively at Sugar, for testing both Sidecar modules and BWC modules. It’s necessary to focus into the BWC frame before attempting to interact with the elements within it. At its simplest, the code for this (in Java) looks like this:

          // interact with non-BWC elements
          driver.switchTo().frame(“bwc-frame”);
          // interact with BWC elements here
          driver.switchTo().defaultContent();
          // resume interacting with non-BWC elements

          Due to timing concerns and use of our in-house wrapper library for Selenium, our actual code for doing this looks quite different and accounts for the loading time of the frame and retrying if the focus change fails, but at its heart, this is what the code is doing. Please let me know if this answers your question — if not, let’s continue this conversation at the Sugar Community forum at http://community.sugarcrm.com/. Please share more details there about what code you’re running and what problem you’re seeing and I’ll see if I can help!

          Thank you,

          -David Safar

  3. 

    Hi,

    I want to use selenium webdriver2.49 for sugarcrm 7.7 version, Windows 7 with Firefiox 46 is it recommended?

    Currently when I try to execute the code scripted for Sugarcrm6.5 on Sugar7.7(After modification), the browser shuts down after login, where as the similar code works fine in sugar6.5.

    Kindly let me know if there is any specific framework recommended by Sugar.

    Cheers!

  4. 

    Matt,

    I’m interested in getting started with some automated testing for Sugar and have a couple of questions.

    1) We are currently on 7.7.2.1. I noticed there aren’t unit tests for our version available. Would 7.7.1 be the best version to try?

    2) Is there any type of webinar or training related to Sugar automated training? As we get started with this, any additional info or resources would be helpful.

    Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s