ScalaTest

IntelliJ hacks using Scala

Reading Time: 3 minutes Introduction An IDE or integrated development environment is a software application that combines, in one place, all the tools needed for a software development project. On a more basic level, IDEs provide interfaces for users to write code, organize text groups, and automate programming redundancies. Here we will talk about IntelliJ IDEA, one of the popular IDE in the market which has advantages over others Continue Reading

Testing in Scala (Frameworks, Code Coverage, Mocking, Matchers, and ScalaTest)

Reading Time: 5 minutes We will be covering the below concepts in this blog: Why we need testing Test Libraries How to set up ScalaTest Different frameworks in ScalaTest and how to use them Mocking  Matchers Plugins for Code Coverage Why we need testing: Firstly, as a good software developers it is important to use testing that is good and has good coverage. Testing is an essential part of Continue Reading

Scoverage Analysis | Scala | SBT

Reading Time: 3 minutes Scoverage… what it is, how to use it and for which build tool it is available. So, In this blog we are gonna discussing all these along with its implementation in SBT. What is scoverage ? “scoverage” is an Apache’s free licensed code coverage tool for Scala language that put forward the statement and branch coverage. It is available for SBT, Maven, and Gradle. Advantage Continue Reading

Data-driven framework with selenium, Scala, and SBT

Reading Time: 4 minutes Hello everyone, in our last blog we saw that how we can execute ours test in headless mode and now in this blog we will see how we can achieve Data-driven framework with selenium, Scala, and SBT. Need for data-driven framework A data-Driven framework helps us in separating the test script logic and the test data from one another. It allows us to write test Continue Reading

Combining Gatling Reports

Reading Time: 4 minutes Hi guys, In this blog, we shall discuss about the report generation through Gatling and combining Gatling Reports. As you may already know, when we run a Gatling test the report gets generated automatically. However, you cannot compare the Gatling test report of two different tests in a single report unless you have the enterprise version of Gatling. I will try to explain an easy Continue Reading

Accessing private fields and methods using reflection

Reading Time: 3 minutes How to access private methods of a class.
You can do this by the help of reflections at runtime.

Table Driven Testing in Scala

Reading Time: 3 minutes As a software developer, I ensure to write unit tests for the code which I write (and at times the missing unit tests for the existing code). My aim has been to ensure to cover all the cases that arise out of the code written and therefore I face challenges in this too. Because of my endeavour to write a sufficiently strong test suite for Continue Reading

Beginners Guide for Mocking in Scala

Reading Time: 3 minutes We all must know how the unit test cases are one of the most important part of an application. If not? Then I must tell you that unit testing is one of the earliest testings which is performed on the unit of code and the earlier the defects are detected, the easier it is to fix. It reduces the difficulties of discovering errors contained in Continue Reading

Solr With Scala: Rest End Points with AKKA HTTP

Reading Time: < 1 minute Hello Folks, Today we will discuss about Solr, Scala with Akka-HTTP. We will create rest-endpoints and try to connect with Solr server with them. The basic idea behind using Akka-HTTP for creating Rest end points is modules implement a full server and client-side HTTP stack on top of akka-actor and akka-stream. We can customize these routes according to our use case. We will talk step Continue Reading

Generating, visiting and unit testing grammar using ANTLR4 with Java and Scala

Reading Time: 6 minutes “Quality is free, but only to those who are willing to pay heavily for it” – T. DeMarco Now unit testing is not that heavy to pay off so lets start the blog. In this blog we will be continuing the voyage to the kingdom of ANTLR4 RECAP In previous blog we discussed how to test whether a string is grammatically correct or not using Continue Reading

KnolX: Unit Testing of Spark Applications

Reading Time: < 1 minute Knoldus organized a KnolX session on Wednesday, 13 April 2016. In this KnolX session, we explored the different methods of writing unit tests for Spark applications. This session also talks about how unit testing of Spark applications is done, as well as tells about the best way to do it. This includes writing unit tests with and without Spark Testing Base package, which is a spark Continue Reading

How to write test-case for Scala.js application

Reading Time: < 1 minute Few months ago, I created a web application ‘Weather Report‘, based on Scala.js.  In this blog, I have explained how we can test our Scala.js application. Since I am still exploring it, so I took help from scalajs-tutorial.  I have used µTest as testing library. // uTest settings libraryDependencies += “com.lihaoyi” %%% “utest” % “0.3.0” % “test” testFrameworks += new TestFramework(“utest.runner.Framework”) Here is example of test-cases: def tests = Continue Reading

Testing Scala Applications with In-memory mongoDB

Reading Time: 2 minutes Is your test suite taking a large amount of time to run just because your methods need some database queries to be handled? Testing with In-memory databases can save a hell lot of time. In-memory database makes the queries readily available to methods in a matter of milliseconds. In case you are using mongoDB, this blog can help you run your test suite much faster Continue Reading