Giter Site home page Giter Site logo

tddexample's Introduction

Test frameworks

testCompile 'junit:junit:4.12'

testCompile group: 'org.mockito', name: 'mockito-core', version: ‘1.10.19'

Requirement (in BDD way) - stage I

GIVEN that a user is not signed in
WHEN a user sign in with a password shorter then 6 character
THEN user account manager notify user that there’s an error with message ‘Password shorter then 6 characters’

GIVEN that a user is not signed in
WHEN a user sign in with a username shorter then 5 character
THEN user account manager notify user that there’s an error with message ‘Username shorter then 5 characters’

GIVEN that a user is not signed in and the app is not connected to internet
WHEN a user sign in with a valid password and username
THEN user account manager notify user that there’s an error with message ‘No internet connection’

GIVEN that a user is not signed in
WHEN a user sign in with a valid username and password
THEN user account manager will make a request to server to sign In

GIVEN that a user sign in request is success
WHEN a user sign in with a invalid password and username
THEN user account manager will make a request to server to sign In and notify user with message ‘Invalid username or password’

GIVEN that a user sign in request is success
WHEN a user sign in with a valid password and username
THEN user account manager will navigate the user to welcome screen

Requirement (in BDD way) - stage II

GIVEN that a user is not registered
WHEN a user create account with a password shorter then 6 character
THEN user account manager notify user that there’s an error with message ‘Password shorter then 6 characters’

GIVEN that a user is not registered
WHEN a user create account with invalid email
THEN user account manager notify user that there’s an error with message ‘Please enter valid email Id’

GIVEN that a user is not registered and the app is not connected to internet
WHEN a user create account with a valid first name, last name, email, username and password
THEN user account manager notify user that there’s an error with message ‘No internet connection’

GIVEN that a user is not registered
WHEN a user create account with any empty field
THEN user account manager notify user that there’s an error with message ‘[given field] can't be empty!’

GIVEN that a user is not registered
WHEN a user create account with a valid first name, last name, email, username and password
THEN user account manager will make a request to server to create account

GIVEN that a user is not registered
WHEN a user create account with a valid first name, last name, email, username and password
THEN user account manager will navigate the user to welcome screen

tddexample's People

Contributors

kavyasoni 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.