Giter Site home page Giter Site logo

mehdigolzadeh / calculator-cucumber-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sahi-mfg/calculator-cucumber

0.0 1.0 0.0 1005 KB

This repository is used for teaching purposes at the University of Mons. It contains Java code for computing arithmetic expressions. The code is accompanied with unit tests and BDD scenarios. We have also tried to pay particular attention to code quality.

Java 91.26% Gherkin 8.74%

calculator-cucumber-1's Introduction

Code quality: Maven Build BCH compliance Codacy Badge

Test coverage: Coverage Branches

Calculating arithmetic expressions

About

This repository contains Java 11 code for computing arithmetic expressions. It is deliberately incomplete as it serves to be the basis of all kinds of extensions, such as a more sophisticated Calculator application. The code was written to be used for educational purposes at the University of Mons, Belgium in the context of the software evolution course.

Unit testing and BDD

  • All tests can be found in the src\test directory. They serve as executable documentation of the source code.
  • The source code is accompanied by a set of JUnit 5 unit tests. These tests can be written and run in the usual way. If you are not familiar with unit testing or JUnit 5, please refer to https://junit.org/junit5/.
  • The source code is accompanied by a set of Cucumber BDD scenarios, also running in Junit. If you are not familiar with Cucumber and BDD, please refer to https://cucumber.io/docs/cucumber/. The BDD scenarios are specified as .feature files in the src\test\resources directory. Some classes defined in src\test take care of converting these scenarios to executable JUnit tests.

Prerequisites

  • You will need to have a running version of Java 11 on your machine in order to be able to compile and execute this code.
  • You will also need to have a running version of Maven, since this project is accompanied by a pom.xml file so that it can be installed, compiled, tested and run using Maven.

Installation and testing instructions

  • Upon first use of the code in this repository, you will need to run "mvn install" to ensure that all required project dependencies (e.g. for Java, JUnit, Cucumber, and Maven) will be downloaded and installed locally.
  • Assuming you have a sufficiently recent version of Maven installed (the required versions are specified as properties in the POM file), you can compile the source code using "mvn compile"
  • Once the code is compiled, you can execute the main class of the Java code using "mvn exec:java"
  • The tests and BDD scenarios are executable with Maven using "mvn test"
  • Note that the tests are also executed when you do a "mvn install". It is possible to skip those tests by providing an extra parameter. For details of more advanced uses of Maven, please refer to its official documentation https://maven.apache.org/guides/.

Test coverage and JavaDoc reporting

  • In addition to testing the code, "mvn test" will also generate a test coverage report (in HTML format) using JaCoCo. This test coverage is generated in target/site/jacoco.
  • When packaging the code using "mvn package" the JavaDoc code documentation will be generated and stored in target/site/apidocs.

Built With

  • Maven - an open source build automation and dependency management tool
  • JUnit5 - a unit testing framework for Java
  • Cucumber - a tool for Behaviour-Driven Development
  • JaCoCo - a code coverage library for Java

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Contributors

  • Tom Mens
  • Gauvain Devillez @GauvainD
  • Damien Legay @DamienLegay

Licence

This code is licensed as CC BY-SA 4.0 (Creative Commons Attribution-ShareAlike 4.0 International) https://creativecommons.org/licenses/by-sa/4.0/

Acknowledgments

  • Software Engineering Lab, Faculty of Sciences, University of Mons, Belgium.

calculator-cucumber-1's People

Contributors

tommens avatar dependabot[bot] avatar yazgoo avatar github-actions[bot] avatar damienlegay avatar gauvaind avatar codacy-badger avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.