unit testing Archives - SoftUni Global https://softuni.org/tag/unit-testing/ Learn Programming and Start a Developer Job Wed, 30 Mar 2022 11:50:58 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.3 https://softuni.org/wp-content/uploads/2022/04/cropped-SoftUni-Global-Logo-Square-notext-32x32.png unit testing Archives - SoftUni Global https://softuni.org/tag/unit-testing/ 32 32 Software Engineering Overview [Dev Concepts #30] https://softuni.org/dev-concepts/software-engineering-overview/ https://softuni.org/dev-concepts/software-engineering-overview/#respond Thu, 10 Feb 2022 06:00:00 +0000 https://softuni.org/?p=11933 In this article of the series Dev Concepts, we take a look at Software Engineering, Quality Assurance, Unit Testing, Source Control and Project Tracking.

The post Software Engineering Overview [Dev Concepts #30] appeared first on SoftUni Global.

]]>

For this article, we will make an overview of software engineering concepts like software development lifecycle, software quality assurance, unit testing, source control system, and project trackers. Each concept is essential for your development as a software engineer. You should have a basic knowledge of each area because they are daily used in software companies. Even if the technologies differ, the concept is still the same but with a different GUI and software.

sdlc-diagram

  • The Software Development Lifecycle is a process used by the software industry to designdevelop, and test high-quality software. It aims to produce high-quality software that meets or exceeds customer expectations reaches completion within times and cost estimates. The benefits of using it only exist if the plan is followed faithfully. Read our blog post about them here.

designer-work-with-internet-vector

  • Software Quality Assurance is a term that covers all aspects of guaranteeing a high-quality software product. It includes creating processes for each stage of development to reduce bugs and flaws during the build. Companies need it to measure the quality of the software. At the heart of the QA process is software testing. Read more about them in our separate blog post here.
  • Unit testing is an important concept and practice in software development. As a term, unit tests are pieces of code that test specific functionality in a certain software component.  Unit testing frameworks simplify, structure, and organize the unit testing process. It executes the test and generates reports. Examples of unit testing frameworks are JUnit for Java and Mocha for JavaScript. Read more here.

unit_testing_guidelines

  • Git is the most popular source control system in modern software development. It is a powerful tool for version control and team collaboration at the source code level. In our article, we work with Git and GitHub by showing a few examples. We clone the repositoryedit a local file, commit the local changes, and then publish the commit. You can read it here.

github-architecture

  • Project trackers, as a term, are a simple tool that manages the project schedule, planassignarrangetrack and visualize project tasks. They are a great way to make your tasks come to life and visualize your upcoming week or month’s tasks. You can read more about them in our blog post here.

trello-design

All of these concepts are important for your future development as a software engineer. Each topic can be separated into a course and studied in detail. Even if you are indifferent to all the concepts, you should know at least the basics about each topic. In almost every interview for a software developer, you will be asked if you are familiar with these areas. Each software company uses different technologies, but the concepts are the same.

Lesson Topics

In this tutorial we cover the following topics:
  • Software Development LifeCycle
  • Software Quality Assurance (QA)
  • Unit Testing and Testing Frameworks
  • Overview of Git and GitHub
  • Project Trackers, Kanban Boards, and Trello

Lesson Slides

The post Software Engineering Overview [Dev Concepts #30] appeared first on SoftUni Global.

]]>
https://softuni.org/dev-concepts/software-engineering-overview/feed/ 0
What You Need to Know About Unit Testing [Dev Concepts #27] https://softuni.org/dev-concepts/what-you-need-to-know-about-unit-testing/ https://softuni.org/dev-concepts/what-you-need-to-know-about-unit-testing/#respond Thu, 27 Jan 2022 07:10:00 +0000 https://softuni.org/?p=11046 In this article of the series Dev Concepts, we take a look at Unit Testing and Testing Frameworks.

The post What You Need to Know About Unit Testing [Dev Concepts #27] appeared first on SoftUni Global.

]]>

Unit testing is an important concept and practice in software development. As a term, unit tests are pieces of code that test specific functionality in a certain software component. Usually, they are not written by QA engineers but from the developers that wrote the code. Unit tests are part of the product source code and aim to improve the code quality, reliability, and maintainability.

unit_testing_guidelines

Unit testing frameworks simplify, structure, and organize the unit testing process. It executes the test and generates reports. The developers organize tests in a hierarchy using classes and functions. After that is done, they assert the execution result and exit all conditions for correctness. Examples of unit testing frameworks are: JUnit for Java and Mocha for JavaScript.

boxes-unit-testingThe Unit testing techniques are mainly categorized into three parts which are Black box testing that involves testing of user interface along with input and output, White box testing that involves testing the functional behaviour of the software application and Gray box testing that is used to execute test suites, test methods, test cases and performing risk analysis.

Unit test developers usually follow the “AAA pattern“. It stands for:

  • arrange the input data and entrance conditions
  • act – execute the function for testing
  • assert whether the results and the exit conditions are as expected

In the arrange section, you have the code required for setting up the specific test. Here is where we create objects and potentially set expectations. Then there is the act, which should be the invocation of the method being tested. In the assert, you would check whether the expectations are met.

unit-test-ticket

By implementing unit testing, it’s easier to catch and fix issues early before they cost extra time and money. It can become an important part of the overall software development process, helping to foster development more efficiently and productively. We should aim to write unit tests that focus solely on a single unit of code. With having more test reports, it will be easy to find the error in our code.

Lesson Topics

In this tutorial we cover the following topics:
  • Unit Testing
  • Unit Testing Framework

Lesson Slides

The post What You Need to Know About Unit Testing [Dev Concepts #27] appeared first on SoftUni Global.

]]>
https://softuni.org/dev-concepts/what-you-need-to-know-about-unit-testing/feed/ 0