Coder Social home page Coder Social logo

veridical's Introduction

Motivation

Test case generation covers 40-70% of the software test life cycle. Current practices involve manually writing the test cases based on the functional requirements provided.

To save manual effort the proposed work tries to investigate the possibility of an auto-generation of test cases using natural language processing. Auto-generated tests will also facilitate easier maintenance and reuse of test cases if the customer changes the requirements.

High level Design of model

  1. The input is in the form of a user story and test scenario description.
  2. The natural language parser performs sentence splitting, part-of-speech tagging, and syntactic parsing to identify the relationship between the words.
  3. Using the dependencies derived we convert them into frames which is intermediary structured representations while transforming user requirements into UML activity diagram.
  4. From the activity diagram, we create the activity graph consisting of all the activities represented as nodes.
  5. Traversal of all possible valid paths using the Depth First Search algorithm/Breadth First Search algorithm.

Identification of dependencies and converting them into frames

Software build

  1. Step 1: Get sources from GitHub$ git clone https://github.com/scm/crtx/qa-intern-project-test.git
  2. Download external jar dependencies in the project buildpath.
  3. mvn clean install.

Resolve dependencies for MacOS:

  1. Download WordNet-3.0\
  2. cd Downloads/WordNet-3.0\
  3. Locate 'Tcl.framework' and 'Tk.framework/' modify paths if needed and run the command below to compile WordNet with appropriate paths for 'Tcl.framework' and 'Tk.framework'.

WordNet-3.0 % sudo ./configure --with-tclconfig=/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Tcl.framework --with-tkconfig=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/

Expected Output:

WordNet is now configured

Installation directory: /usr/local/WordNet-3.0

To build and install WordNet:

make
make install

To run, environment variables should be set as follows:

PATH - include ${exec_prefix}/bin
WNHOME - if not using default installation location, set to /usr/local/WordNet-3.0

See INSTALL file for details and additional environment variables
which may need to be set on your system.
  1. Next run:- WordNet-3.0 % make

  2. Next run:- WordNet-3.0 % make install

Pre-requisites:

  1. Install Java and add environment variable. export JAVA_HOME="/usr/libexec/java_home">> ~/.bash_profile

  2. Install maven and add environment variable. export PATH="$PATH:/Users/$username/Documents/apache-maven-3.8.3/bin"

Use cases and benefits

  1. Clients were interested in the possibility of capturing design requirements in a behavioral model that could potentially reduce rework due to miscommunication between the product owner and developer/tester.
  2. The test cases must be able to provide maximum coverage of paths and data.
  3. Not all the testers have prior knowledge of the working of the system which leads to difficulties in designing the test cases to match the product owner’s needs.
  4. Autogeneration of test cases will help save time and money, improve the quality of testing and ensure better test coverage.
  5. Autogenerated tests will also facilitate easier maintenance and reuse of test cases if the customer changes the requirements.

Design

Resolving some errors in java code

JVM max memory error ->

  1. go to run-> run configurations-> arguments-> vm arguments
  2. specify -> -Xms1024M -Xmx4096M
  3. Relaunch proj

wordnet path error->

  1. go to GetSynonyms.java
  2. if you're using mac set path accordingly and change wordnet version.(Same for windows)

For automatic generation of dictionary

Generating a dictionary automatically will result in reduction in effort, time and cost: Developers who would have otherwise spent time and effort on manually writing the dictionary, can now spend more time and effort on the other important aspects of SDLC. New system architecture diagram

The main theme and motivation is that, instead of requiring programmers to write manual dictionary, it is practical to extract keywords using natural language processing techniques from the scenario descriptions and store them with their associated test steps.

Modules for dictionary generation:
● Parts Of Speech Tagging: In the test case scenario, the procedure of tagging the words. ● Keyword Extraction: To extract bigrams from the test case scenarios to store them in the dictionary as a key value pair. ● Classifying spam/not spam: For each test scenario description, a lot of bigrams are extracted which are then filtered using classification algorithms. Process for generating dictionary

Requirements: Python version 3 and above

Libraries required: Pandas, Numpy, TfidfVectorizer Sklearn, Stanza, NLTK, keybert

All these libraries can be installed by running the following command on terminal/command prompt:
	pip install lib_name

veridical's People

Contributors

poojasalve25 avatar verika1 avatar sakshibalnathbankar avatar vaishnavghenge avatar eshachaugule avatar veritasosrb avatar aniket-kr avatar sanju628 avatar yashsarnaik22 avatar sumitdighe avatar yoshiokafutaba avatar

Watchers

Vaibhav Joshi avatar  avatar  avatar Omkar Amilkanthwar avatar  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.