API Testing with the Karate Framework

This article has two goals. The first is to find interesting information about API Testing with Karate. The second is to help you discover how interesting test automation is and dive deeper into the knowledge behind the passionate job of testing.

And why testing and not Quality Assurance? In this topic, I follow Michael Bolton when he says “Testers: Get Out of the Quality Assurance Business” Words matter and this is a matter of expectations management: we cannot promise something we cannot accomplish.

Michael Bolton

The Forgotten Layer of the Test Automation Pyramid

When we think and design a testing strategy we should not forget The Forgotten Layer of the Test Automation Pyramid: The service layer.

Here is where we need to mention the test automation pyramid. This concept is introduced by Mike Cohn in his book Succeeding with Agile.

He describes three levels of test automation, their relationship, and their relative importance. The base layer consists of unit tests and the top layer corresponds to user interface-level tests.

Many times when we start testing without a proper strategy we end up doing the opposite: investing most of the time and the effort in UI tests, which are more expensive to develop and maintain than unit tests. Also we can forget to develop tests for the service level, that’s why they call it the forgotten layer.

As Joe Collantonio described some years ago now, API testing is becoming more and more important. So even if we agree or not with the test automation pyramid schema, it reminds us that we have to pay attention to API testing as part of our strategy.

Software Development Life Cycle

We’re into a spatial representation of the job. As we move down in the testing pyramid, the tests are cheaper, easier to develop, and can find issues in earlier stages, which makes them easier and cheaper to fix than in later stages.

This can be seen as moving left in the Software Development Life Cycle (SDLC), so many teams are involved in Shift Left Testing. Is that enough? It’s not, but it’s a really good move. Which is the next step? Continuous testing. Involve testing in every stage of the SDLC, doing it efficiently, doing it repeatedly, as part of the whole process.

Here is when selecting the right tools becomes important: a testing tool that can integrate with our CI (continuous integration)/CD (continuous delivery) systems is a great value.

API Testing Resources

As API testing becomes more and more important, we can find a lot of sites to help us learn more about it. I can suggest just a couple of them which I found very useful:

Learn more about the Karate framework

Why is Karate so attractive? Because it’s an open-source tool that combines API test-automation, mocks, performance-testing, and even UI automation into a single, unified testing framework.

Let’s take a look at some of the benefits:

  • Language neutral
  • Suitable for non-programmers
  • Elegant DSL syntax
  • Built on Cucumber / BDD Syntax
  • Integrates into existing CI/CD
  • Good documentation
  • Good demos

This Hello World example gives an idea of how simple yet powerful it is.

Peter Thomas provides a deeper explanation in his Webinar on Micro-services Testing With Karate.

I found really good arguments about how we can leverage the goods of Karate for our own project. Learn more in the following example: Karate, the black belt of HTTP API testing?.

Some points that look interesting are:

  • Tests = Documentation: tests are so easy to read that you can document your API with your tests. And as you have to maintain your tests as the API changes, you have your documentation always up to date.
  • Simple: Karate takes care of complexity so you don’t have to worry about Json processing as Karate takes care of that.
  • Re-use Karate tests in Gatling to do performance testing: having the power of Gatling based on the API tests you already have is a big win.
  • Comprehensive and detailed reports: Karate brings powerful and detailed reports that makes reading the status of our tests very easy. It’s also helpful to debug and troubleshoot problems when you get failures. If you add the benefit of Gatling reports it’s like having two superpowers.
  • Data Driven Testing: you can run your tests through tables.
  • Mocks fake HTTP servlet: you can execute your tests with a mock server that implements your API.

Karate vs Rest-assured

Do you need to decide which tool suits better for your needs?

Refer more about the following comparison here.

Extra sources about Karate API Testing

I found very useful the following example in Test Guild site.
You can also check this demo.

Conclusions

I found Karate can be a great option for automating the checks in the forgotten layer, integrating it in your CI/CD schema, also re-using your tests as the documentation of your API and for performance testing.

Is the right tool for you? It depends on your particular project, your needs, and your team. If you want to add the API testing to your strategy, you don’t have too much time and you want to make it simple, it seems like a great option.

Learn more from our team here, or check out our testing services.

App Development with Salesforce Technologies

Working together with our partners to bring ideas to life is one of the driving forces behind everything we do here at Oktana. That’s why when Huge approached us to help them with app development for Stanley Security; we leaped at the chance.

Stanley is a large security company specializing in commercial security systems. They needed a tool for their field sales team to use on the go that showcased their current product offerings. Also, they preferred to manage the process through the app, on either computers or tablets.

Huge has excellent skills in front-end development and was planning to develop the app and the UI/UX elements internally. But they needed a partner to help complete the backend work and sync everything up with Stanley’s Salesforce instance. That’s where the team at Oktana came in. Huge was able to focus on designing a front-end experience that would satisfy Stanley’s sales team. Meanwhile, Oktana could focus on a seamless experience on the back end.

How do the front and the back of this application work, and what did it take to make them play nicely? The front-end app was built utilizing React and Node.JS, managed with a Postgres database that Huge hosted on Heroku. For our backend development, we needed to make sure everything tied into the Postgres database correctly. To do that we utilized Heroku Connect to transfer between the front-end database and Salesforce. Additionally, we mapped all the data so that everything was stored where it needed to be on both ends of the application process. This application’s design was for interfacing with Stanley’s Salesforce organization, and it required a Salesforce login to access the app and all of its features. The login ensured that anyone using that app is a part of the sales team at Stanley. 

Now, beyond the basic connective functionality, we needed to complete all aspects of the sales cycle through this app. This included allowing the sales team to send emails for clients with sales details and other information. To make that happen, we built an email tool using Apex and Visualforce. Stanley also wanted to close sales within the app, so we built in Adobe Sign functionality. Sales contracts could be signed digitally, and Zuora payment systems facilitated immediate payment. The final step was to synch the new data with the Salesforce organization.

The key technologies used in this project include:

  • Salesforce
  • Heroku
  • Postgres
  • React
  • Node.JS
  • Heroku Connect
  • Apex
  • Visualforce
  • Adobe Sign
  • Zuora

This project allowed us to work collaboratively with another development team to build different parts of an app. We’ve been able to successfully demonstrate our skill and ability to understand other’s work and apply it to our goals.

We’re looking forward to working with both Huge and Stanley again in the future. If you have a project that we can help you with, please be sure to let us know!

Learn more from our team here, or check out our custom development services.

Building Demos and Prototypes at Oktana

Everyone at Oktana is the best of the best at what they do and the incredible people that make up the Demos and Proof of Concepts team lead by Gonzalo is the perfect example of that. Whether it’s a Salesforce, mobile, or web project the team works hard to make our client’s dreams and ideas and make them a reality. The needs of our clients always come first and as such the team has developed into an extremely agile machine that is capable of producing and iterating on projects quickly while responding to new and changing requests.

The Demos and Proof of Concepts team’s role are to help our clients work through the entire prototyping process. First, we bring on all stakeholders and map out what the client’s goals and vision for the project are. The team is extremely adaptable and capable of discussing tasks at a very high level regardless of how fleshed out the idea is. Once all these ideas are captured the design team here at Oktana gets to work on designing the prototype. The design process here is highly iterative as we want to make sure our work is aligning with all of our client needs.

Once the design has been completed, the assets are then passed on to the engineering team. The engineering team then takes pre-built templates and reworks them into a working prototype for the project at hand. They continue to iterate on the concept with the client to ensure that it meets their needs. Once this process is completed the client will either decide to move forward on the development of the full product or not. If they opt not to move forward all code is then scrapped and the team moves on to its next project.

The Demos and Proof of Concepts team does incredible work for our clients with very little notice. They’ve built demos and prototypes that have been used for presentations in front of thousands of people at major conferences. If you’re ever in need of a demo or prototype then our team is here for you.

If you are a Salesforce partner looking to partner with experts to help you provide the best custom app development solutions to your clients Contact us. Our team will give you more information about these services. 

Lightning Experience vs. Salesforce Classic: Is the Lightning Experience Revolutionizing Salesforce?

User experience is a huge factor in how a particular platform is perceived by end users and ultimately defines whether or not they will adopt to utilizing the platform. User interfaces that are choppy and lack visually appealing features tend to fall by the wayside because they are not engaging and they’re more than likely not as functional as they should be. For example, Salesforce updated their platform by implementing the Lightning Experience; a new and exciting way to view and access your Salesforce profile, as opposed to the duller, less visually satisfying Classic mode.

 

Well, perhaps, we can lay out the pros and cons of each Salesforce feature and establish how each comes with its own set of benefits. Lightning or Classic, you ask?

 

As the predecessor of the Lightning Experience, Salesforce Classic provides users with plenty of resources to complete their daily work tasks. It comes fully stocked with all of the typical CRM capabilities that ISVs/admins will utilize daily such as, accounts, leads, opportunities, campaigns, etc. Additionally, developers can use JavaScript source codes to build out tools like Process Builder, Visual Workflow, or code-driven approaches.

 

 

Salesforce Classic

Salesforce Classic has proven to be an optimal solution over the years, however, there’s a sleeker and more intuitive Salesforce UI that’s on the horizon; the Lightning experience! It has an entirely different user interface for Salesforce.com (SFDC) and it possesses some of the core Salesforce classic features as well. Additionally, it has many new cloud-based features and Salesforce objects are given a cleaner, fresher and overall more visually appealing look. The major goal of the Lightning experience was to enhance the usage of data and tools by minimizing the clickthrough rate so that Sales Reps could perform their job functions quickly and easily. AND – it’s completely mobile responsive.

 

Lightning Experience

The weigh-in?

While the Lightning experience looks awesome, it still has some catching up to do in terms of not having the most utilized Salesforce classic features embedded into its interface. Also, developers are not able to continue to use JavaScript/Visualforce coding libraries and some AppExchange apps might not be supported in the Lightning experience. If you’re a Salesforce party that has not yet fully acclimated to Salesforce classic and have no users/developers or system admins in your Org, it’s definitely best to go straight to the Lightning experience and build out your Org on this platform.

 

However, if you’ve heavily delegated all of your work tasks within Salesforce Classic, it may better serve to you to wait it out until Lightning experience gets up to speed and fully incorporates features like territory management for sharing and assigning accounts, Public Knowledge Base, Live Agent, Macros, among other features that streamline and simplify workplace functionalities.

 

As you can see, user experience plays a large role in both viewing formats. With Salesforce Classic, usability depends more on functionality and streamlining work whereas Lightning experience tends to focus more on the “look and feel.” The Lightning experience is definitely the way of the future and we suggest a slow transition whereby switching back and forth between each mode may be the ideal approach until Lightning incorporates more features for functionality. With that being said, we think both Salesforce Classic and the Lightning experience both have much to offer, however, Lightning is the new frontier in the Salesforce arena and eventually, we’ll all want to entirely jump on the bandwagon! 

 

Check out our new article about Salesforce Classic vs Lightning: More than a pretty interface. 

TrailheaDX or Dreamforce: Which is better for Developers?

trailheaDX 2018

As a platform development services company, we value hard work, dedication, passion and really honing in on the complexities of building out these environments. This means that our developers are thoroughly examining the structure of these platforms from a very granular level and building a foundation that will thoroughly support the development process. Oktana’s talented team of developers and designers truly embody these core qualities, however, we know that collaboration and eagerness to share and learn are what also makes us grow as a company.

 

TrailheaDX vs. Dreamforce

This starts with attending conferences and events that serve as a sounding board for like-minded technology professionals to bounce ideas around and come up with innovative and tech-forward strategies for development services. One such event is TrailheadDX; a Salesforce conference that welcomes tech companies from all over the world to attend and share best practices for the tech industry, especially with regard to the Salesforce platform.

We recently had the pleasure of attending this year’s TrailheaDX conference in San Francisco for the first time ever! We were pleasantly surprised by the conference, specifically with how much it focuses more on platform development, which is what we here at Oktana marvel in. On a much smaller scale than Dreamforce, TrailheaDX allows companies like ours to really shine and network with individuals who share these similar interests.

TrailheaDX provides a more intimate approach to presenting subject matter panels for topics like automation processes, cloud environment optimization, omnichannel customer environments and panels for just overall improving platform efficiency. Furthermore, since its a smaller venue there’s more face time with product managers, engineering team leads and industry professionals to really share and discuss industry trends. This is also a big plus because you have direct access to decision makers which can expedite future partnerships.

With keynote speeches from Salesforce Chairman & CEO, Marc Benioff, to Star Wars actor, Mark Hamill, we found that TrailheaDX still carried the same weight and star power as Dreamforce, but it caters more to developers which was especially exciting for Oktana. We think it’s tailored specifically for developers and that if you’re a high-level developer you’ll definitely benefit from attending the conference, so we encourage those who specialize in platform development to attend TrailheaDX as well as Dreamforce!

5 Reasons to Use Scala

Java has been on the leading edge of the developing curve for a bevy of reasons. It’s one of the three core technologies that are responsible for the development of world wide web content and it’s reigned supreme in agility, functionality, and simplicity, however, there may be a possible contender that leverages a little more flexibility when it comes to ease of programming. Scala, designed over fifteen years ago by Martin Odersky at the Polytechnic School of Lausanne in Switzerland, runs on the Java Virtual Machine (JVM) and is actively continuing to be developed.

 

What is Scala?

Scala is a source code that is intended to be compiled to Java bytecode so that the resulting executable code runs on a Java virtual machine. Scala provides language interoperability with Java, so that libraries written in both languages may be referenced directly in Scala or Java code.

That being said, let’s dive a little deeper into the Scala world and explore the five reasons why it’s blazing a trail for developers:

 

Safe Parallel Computation

Parallel computing consists of dividing a problem into subproblems, then carrying out the solution of those problems simultaneously (“separate thread”), offering a solution to the initial problem. Java SE offers the reference frame “fork / join framework”, which makes it easier to implement parallel computing in its applications.

 

Agility

This is the particular area where Scala is incontestably better than other languages, such as Java. In Scala, the limitations of OO patterns for implementing code does not apply and this pattern, the developers are also allowed to bring functional paradigms. So you have the best of both worlds when it comes to functional coding paradigms and the OO patterns.

 

Third-party APIs

It’s safe to say every developer needs functionalities for the apps they are creating. Having said that, these days you count with two different options when choosing the functions you want for your app: either you start from scratch or you accept the help of a third party app.  However, Scala comes loaded with built-in functions, so, thanks to this, you now have far better controls with simple code that will surely improve your loading speed.

 

Asynchronous Processing

Scala is built to deliver asynchronous behavior, so, just like other web development frameworks, it offers extreme ease concerning standout natural codes.

 

Lazy Evaluation

This is an evaluation that delays the calculation of an expression until its value becomes necessary. It also avoids repetition of the evaluation in case you may need it on other occasions. This characteristic may decrease the execution time of certain functions exponentially compared to other ways of evaluation.

So as you can see, Scala possesses the capability to surpass the reach of its predecessors and really supply developers with the tools necessary to build out amazing enterprise solutions. Oktana is a huge fan of utilizing Scala to develop user-profiles, implement permission management strategies, and other high order functions.

4 Reasons Git is One Tool to Rule Them All

selenium

Here at Oktana, we focus on quality to ensure the applications we develop are secure, functional and scalable.

 

What is Git?

What is Git, you may ask? Git is an open source version control system used to manage pertinent files and company tracking history, all while coding in a secure environment.

Need further clarity? Let’s provide a little more context. In the early years of software development, engineers feared the possibility of losing their data and progress so they would record paper copies of source code throughout stages of development. Yep, that happened.

Over time, programs were eventually stored in computer hard drives, however, engineers were still cautious and thought further security measures needed to be instated. To address this issue, a lock system was created to protect data which came to be called Source Code Control System (SCCS). To put it simply, if one developer is editing a file, no other personnel can access the file.

As with anything involved with computer software, the next evolution of version control systems elevated to the cloud. There were many contenders but the most widely known was Subversion (SVN). SVN was centralized in one place and was the only source of all truth. The idea here was that if engineers still had to manage a locking file system, at least they could develop multiple versions of those files and create branches to track new versions of files without changing or rewriting the previous versions.

Everyone that had worked with SVN loves Git. It was the evolution of version control giving us the same power of the first paper copies, where you can add side notes in a file, have totally different stories, and backups but now we’re saving trees! Also, it’s in the cloud so it can be accessed from everywhere.

And thus, history was changed, or at least, a version of it.

Now that we have more of a background on Git, let’s explore the features a bit more:

 

Spread and conquer

Remember those single source of truth days? Well those are over now! Anyone who has a copy of the Git repository has access to the history log with all file versions and updates. So, if a meteorite were to crash the server, nothing would be lost because several engineers still have repositories that reflect the same information.

 

Web dependency isn’t independence

In the past, all the tracking was done in the remote repository, you needed to have an internet connection and, of course, to the repository itself. Now you can track everything locally where changes and commits are securely saved on your computer while you enjoy the hills until you return to civilization to deploy

 

Undo mistakes, look like a pro

Let’s face it, we all make mistakes. But don’t worry, in any situation, Git counts with an appropriate command. It doesn’t matter if you need to revert a commit or fix it because you forgot to add a file, you won’t need a new change in your application history.

 

Work in your own style

Git counts with a flexibility other version control systems do not possess, so, obviously, there are plenty of books that provide us with information on the right way to work with Git. However, there are as many books as teams. Every project and every developer has their own developing needs, and this is why Git is popular; it’s very flexible, adaptable, and really fosters team collaboration.

Join us at TrailheaDX!

trailheaDX 2018

Calling out all tech enthusiasts and professionals! We are excited to announce that Oktana will be at the 2018 TrailheaDX conference, meeting and engaging with industry professionals to explore new trends on the Salesforce platform. We here at Oktana are always looking for opportunities to improve our craft, expand our presence with our partners and customers, learn more about technology trends and ultimately to collaborate with the best and the brightest in our industry. TrailheaDX is the perfect outlet for us to network, share and receive best practices and just overall have a good time in the process.

 

Salesforce’s TrailheaDX encourages companies of all sizes and tech-minded individuals to “blaze their trail” to learn, connect, have fun and give back. It’s a 2-day conference where companies can get everything they need to build and develop customer applications that people can really engage with. Salesforce product experts share the best tips and strategies for developers such as clicks, programming languages and coding, hosting services, certifications, and much more! The conference also encourages attendees to share stories amongst other developers, admins, and companies from all over the globe. TrailheaDX wants those who attend to embark on a quest to win prizes and help celebrate the Ohana with an enormous party! TDX will be hosting 150+ technical sessions, trails for both developers and admins, and the opportunity to get hands-on with the latest Salesforce product updates.

 

We couldn’t be more ecstatic to attend TrailheaDX this year to showcase all of the amazing things we’ve accomplished in 2017 and all of the innovative projects we’re working on in 2018! We’re blazing a trail full of amazing projects and can’t wait to present some of them this year. We’re super stoked to attend this year and see what all of the amazing Salesforce partners have been up to, hope to see you there!

 

TrailheaDX: 2017 Salesforce Developer Conference

Key Advantages of React Native

Our first Oktana workshop of the year gave us some amazing tools on how to begin our journey through React Native. We’re always looking for new and innovative ways to develop top-notch functionalities and React Native is the next best thing. Similar to our React Native workshop, we will walk you through the four key advantages of this outstanding framework and how it is an awesome tool for developing optimal solutions with JavaScript

Key advantage of react native

But, first things first, what exactly is React Native? React Native is the next generation of React – a JavaScript code library developed by Facebook and Instagram, released in 2013. It enables users to natively develop rendering applications for both Android and iOS operating systems.

Now that we know a little more about the framework, let’s jump into the 4 key advantages of React Native:

 

JavaScript

According to Stack Overflow, more than 55% of developers use this language, so being JavaScript one of the fastest and most -used programming languages, combined with the community usage and the incredible amount of documentation available, make React Native one of the most developer-friendly frameworks out there.

 

Dynamics

One of the most amazing things about React native is how it makes you think of the moments where you want to go from wireframes to something real, tangible. As you gain experience, you will easily start to notice the “general minimal state” which makes your app work, and quickly notice the way it needs to change, dividing them into components, in order to form a more complex functionality. This way, something that seemed like a huge endeavor, you can resolve in no time.

 

It’s all native

We must definitely highlight that React Native’s building blocks are reusable “native components” that enable developers to build more native-like UI/UX apps as opposed to typical hybrid frameworks that can’t be archived. This way, the app will have the speed, look, and functionality of a native mobile app.

 

Longevity

React is fairly new but it is certainly on an incline for demand. It was first released at the Hackathon to address technical issues for the developers’ community. It eventually transitioned into React Native, a framework created specifically for this initiative. Furthermore, React is heavily supported by the social media giant Facebook, which has made a solid investment in developing its technology.

 

In conclusion, React Native provides great functionality for developers and users. It enables developers to easily and quickly build a fast and intuitive mobile app working for both Android and iOS. Functioning on several different operating systems, it pays homage to their motto, “learn once, write anywhere.”