Giter Club home page Giter Club logo

software-quality-and-testing's Introduction

Unit testing, Tools and Libs

Download the tools to run the examples for the Unit testing part of the "Software quality and testing" course.

Computer lab news

  • Use Windows because Linux is not working at the Lab....

Mandatory programs, tools, libs for sample setup

Sample environment set-up for ucoach-authentication-api

  1. Clone project, run command from cmd, or powershell git clone https://github.com/uCoach/authentication-api.git
  2. Start IntelliJ and Import project from the directory you've cloned into.
  • Click Import Project > "Create Project from existing sources" > Next > Next > Next > Next > Next > Finish
  • File > Project Structure > Project SDK. Set it to the installed root directory of your JDK ( 1.8.x mandatory )
  • Project language level, set it to "SDK Default"
  • Double click on project name > Right-click on 'build.xml', "Add as Ant build file"
  • On the Ant Build Window double click "install"
  1. Install Ivy IDEA and configure
  • File > Settings > Plugins > Search in repositories for IvyIDEA > Click install and restart.
  • File > Settings > IvyIDEA > Ivy Settings set to "Use ivy default"
  • Right click on "ivy.xml" > IvyIDEA > Resolve for all modules > Open Project settings > Ivy Settings set to "Use ivy default"
  • Right click on "ivy.xml" > IvyIDEA > Resolve for authentication-api module
    • You can ignore org.glassfish.ha#ha-api;3.1.9: Unrecognized artifact type: hk2-jar, will not add this as a dependency in IntelliJ.
  • Push CTRL + F9 to compile and test if dependencies have been resolves
  1. Add testing foldery to the project
  • Right click on project name authentication-api > New > Folder > Name it UnitTest
  • Right click on UnitTest folder > Mark directory as > Test Sources Root
  • Open src.ucoach.autu.restclient.util.JsonParser
  • Click on the classname JsonParser > press ALT + ENTER > Create Test
    • Testing library JUnit5
    • For the first tinme IntelliJ won't find it so click on Fix if needed
    • Check all member functions to generate test functions for
    • Click Ok
  • Recompile to test if adding the sample test class works.
  • If compilation worked, right click on UnitTest folder > Run All Tests
  • All tests should pass and you should see Feb 20, 2017 1:18:45 PM org.junit.platform.launcher.core.ServiceLoaderTestEngineRegistry loadTestEngines INFO: Discovered TestEngines with IDs: [junit-jupiter, junit-vintage] Process finished with exit code 0
  1. Enjoy unit testing.

Course 1. authentication-api MANUAL CONFIGURATION

  • Clone/Fork/Download authentication-api
  • Sample project introduction
  • Simple Unit testing example with refactoring
  • Add ivy.xml from course_1

Course 1. authentication-api AUTO CONFIGURATION

  • GoTo Folder course_1 and follow the steps there

Course 2-3. process-centric-service MANUAL CONFIGURATION

Course 2-3. process-centric-service AUTO CONFIGURATION

  • GoTo Folder course_2 and follow the steps there

Course 4.

Contact

software-quality-and-testing's People

Contributors

jacksonfurrier avatar

Watchers

James Cloos avatar Júlia Hermann 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.