TestingDocs.com
Software Testing website
  • JBehave
  • Selenium
  • Testlink
  • Maven
  • Git
  • RAPTOR
  • Questions

User input validation in Raptor flowchart

Tweet
Pin it

Document Contents

  • Introduction
  • User input validation
  • Steps:
  • Input validation Examples
  • Similar functions

Introduction

In this article, we will learn how to perform user input validation in the RAPTOR flowchart. In this example, we will prompt the user to enter a number and we will display the number. It is a fairly easy example. But, the idea is to understand how do we validate the input.

User input validation

Sometimes, we get invalid inputs. For example, we asked the user to input a number. But,
the user might enter invalid inputs like strings, etc. In this flow chart, we will see
how to handle the situation.

Steps:

Launch the Raptor tool.
Drag & Drop an input symbol to the work area in middle to the start and stop symbols.

Enter the user prompt: “Please enter a number”

 

 

We will store the input into a variable called n.

Now place a selection symbol.

 

 

We will check the input with function Is_Number().

Is_Number(n)

In this flowchart context, valid input is a number. Anything, other than a number is invalid
input. For example, if we enter String instead of a number, the flowchart would prompt that the input is invalid.

 

Flowchart Input validation

 

Is_Number() function returns true if the input is number.

 

 

Input validation Examples

The above example stops displaying the error. We can even display an error and prompt the user to try again if the user enters invalid input. Example to try again can be found here:

Recursive way to validate user input in the flowchart:

https://www.testingdocs.com/questions/raptor-flowchart-to-find-the-number-of-digits-in-a-number/

https://www.testingdocs.com/questions/how-to-find-square-root-of-a-number-in-raptor-flowchart/

Similar functions

Similar functions that are useful to validate input are:
Is_Character(param)
This function returns true when the argument is a Character.
Is_String(param)
This function returns true when the argument is a String.

Is_Array(param)
This function returns true when the argument is an Array.

 

RAPTOR tutorial page: https://www.testingdocs.com/raptor-a-flowchart-tool/

Flowchart examples: https://www.testingdocs.com/raptor-flowchart-examples/

RAPTOR official website: https://raptor.martincarlisle.com/

Related Posts

RAPTOR flowcart to write to a file output

Raptor Flowchart /

Writing to a file with RAPTOR

Raptor Flowchart /

Simulation of probabilities die roll using Raptor Flowchart

String length

Raptor Flowchart /

String Operations in Raptor Flowchart

Demo flowchart

Raptor Flowchart /

Raptor Subcharts Demo Flowchart

Running Raptor flowchart on Ubuntu

Raptor Flowchart /

Running Raptor flowchart on Ubuntu

Tag Cloud

Agile Appium Tutorials C++ Eclipse Tutorials Git Tutorials IntelliJ Tutorials Java Java Tutorial JBehave Jenkins Jira Cloud JUnit Tutorial Maven Object-oriented Flowchart Python Tutorials Raptor Flowcharts Selenium IDE TestLink Tutorials

Random Posts

  • TestLink Bitnami Cloud Image
    Overview In this tutorial, we will see the steps

    Read more

  • Code Coverage Tools
    Overview Let’s look at some of the code coverage

    Read more

  • pCloudy Continuous Testing Cloud
    Overview pCloudy is a continuous testing cloud

    Read more

Latest Tweets

Tweets by @TestingDocs

Back to Top

TestingDocs.com

Privacy Policy

Cookie Policy

  • JBehave
  • Selenium
  • Testlink
  • Maven
  • Git
  • RAPTOR
  • Questions
www.TestingDocs.com | All Rights Reserved