<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>User Story Quality Assessment Based on Multi-dimensional Perspective: A Preliminary Framework</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Tianci Wang</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Chunhui Wang</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tong Li</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Zhiguo Liu</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ye Zhai</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>College of Computer Science and Technology, Inner Mongolia Normal University</institution>
          ,
          <addr-line>81 Zhaowuda Road, Hohhot 010022</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Faculty of Information Technology, Beijing University of Technology</institution>
          ,
          <addr-line>100 Ping Le Yuan, Beijing 100124</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>User stories are widely adopted in agile development. Generally, user stories are written by users or customers to describe their needs for the to-be software system. User stories are written in structured natural languages, which may sufer from ambiguity and inconsistency. These user story defects make it dificult for agile development teams to understand requirements and make development plans. User story quality assessment has been investigated for years to mitigate this problem. Most of the current works focus on grammatical defect checking of a user story, but lack semantic defect checking between user stories. In this paper, we propose a multi-dimensional user story quality assessment framework, which is an ongoing study. Specifically, our proposal considers three dimensions, including completeness, testability, and consistency. 11 quality criteria are used to observe user story quality. Our method combines typical NLP techniques and a novel iStar modeling-based analysis to discover defects in user stories from the three dimensions.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;user story</kwd>
        <kwd>iStar models</kwd>
        <kwd>quality assessment</kwd>
        <kwd>user story defect</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>User stories are subject to a process of sorting and dropping early on the agile software
development project. Generally, user stories express an intention for the system from some role and the
reason why that the intent need to be achieved. A common way of writing user stories is " As
a &lt;role&gt;, I want &lt;some intention&gt;, so that &lt;some reason&gt;". For an agile project, stakeholders
such as customers and users will start from specific roles and form multiple user stories. From a
macro-level perspective, there is a hierarchical relationship between user stories, i.e., a user
story may be an epic story, and the achievement of this epic story requires the completion of
some sub-stories.</p>
      <p>There are some defects in user stories that afect the development team’s requirements
understanding and the development plan making. The defects can occur within an individual
user story or between user stories. For example, the lack of necessary components (role
or intention) and using the ambiguous expressions in a user story, and the duplicates and
inconsistencies between two user stories. These defects often lead to problems such as user
story understanding and estimation for development planing.</p>
      <p>
        There are several studies focusing on user story quality from diferent perspectives. Heck
et al. [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ] evaluated the quality of story description from the perspective of completeness,
consistency and correctness. Lucassen et al. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] standardized the strategy from three aspects:
syntax, semantics and pragmatics with the help of linguistics. Wang et al. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] propose three
dimensions of completeness, testability and consistency based on the application scenario of
testdriven development. The above studies define quality criteria for each dimension and propose
defect identification methods for some of quality criteria. In terms of defect identification
methods, most of the researches use NLP techniques to achieve grammatical checking of a
single user story, while lack of checks for semantic level between user stories.
      </p>
      <p>
        User story modeling can help us understand the logic between user stories, and then find
some deep-seated quality problems hidden in the text description. In our preliminary work
[
        <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
        ], we argue that some of iStar models concepts and relationships can potentially be aligned
with user stories and propose an iStar model generation method. In [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], the iStar model nodes
and refinement relationship and quality dependence of user stories can be identified from a set
of user stories. Through automated modeling and analysis of the generated initial model, we
found that there are some defects. We believe that observing the generated iStar models can
help us discover quality defects that are hidden behind grammatical expressions between user
stories.
      </p>
      <p>
        This paper proposes a user story quality assessment framework based on NLP techniques
and iStar models analysis method from multi-dimensional perspective. The user story quality
criteria in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] are used to classify the quality defects in user stories. The iStar model generation
method in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] is used to get iStar models for quality analysis. For each quality criterion, this
paper proposes the applicable method. For a single user story, NLP based approach is used to
check grammatical defects. For a group of user stories, an iStar model analysis method is used
to identify semantic defects.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <sec id="sec-2-1">
        <title>2.1. User story quality criteria</title>
        <p>
          At present, some related work has classified and sorted out the quality standards of user stories.
For example, the six mnemonic heuristics of INVEST (independent negotiable valuable estimable
extensible testable) framework [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. General quality guidelines in agile RE [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. Lucassen et al.
took a step forward based on the INVEST criterion and proposed a quality user story (QUS)
framework [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ], this is a set of 13 criteria, according to the story writing and story description
characteristics, the quality assessment criteria are divided into three aspects: syntax, semantics
and pragmatics from the perspective of natural language analysis. In our previous work [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ],
we thought that user stories express requirements, and it is more appropriate to measure them
from the perspective of requirements quality. As shown in Table 1, we reorganize the user
story quality evaluation criteria from the three dimensions of completeness, testability and
consistency, and give a detailed explanation and explanation for each criterion, so as to improve
the quality of user story writing.
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. User story requirement modeling</title>
        <p>
          There are some works on user story requirements modeling. Lin et al. [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] describe a
goaloriented approach to model goal requirements from user stories. Goal-Net approach is proposed
to represent the goal model. Wautelet et al. [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] construct a rationale model from user stories.
They divide the user story into three main parts (actors, action and benefit) and generate iStar
models for the action or benefit part of the user story.
        </p>
        <p>
          In our early work [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ], we proposed the construction of iStar models. Firstly, iStar models
nodes are identified from a group of user scenarios, then similar nodes are merged by using the
similarity algorithm based on Bert model. Based on the merged nodes and the information of
node type, the edges between nodes are identified and an initial iStar model is obtained. We
believe that the construction of iStar models can better identify the relationships between user
stories and help for us to finding some quality problems between use stories, such as duplicates
and inconsistencies.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Proposal</title>
      <p>After a set of user stories are gathered, two diferent strategies are used to check the quality
criteria in Table 1. One strategy is used for each individual user story in user story set to deal
with the quality criteria in component completeness analysis perspective and the testability
analysis perspective. The other strategy is used for the user story set to deal with the quality
criteria in consistency analysis perspective. In the first strategy, the NLP based approach is used
to check each user story. For the second strategy, iStar model needs to be generated firstly and
form a global view point to observe user stories. Figure 1 shows the process of quality checking
in user stories.</p>
      <sec id="sec-3-1">
        <title>3.1. User story quality analysis based on NLP</title>
        <p>To check the quality criteria in component completeness and testability perspectives, we will
use four core natural language processing functions: sentence segmentation, tokenization,
normalization, part of speech tagging (POS tagging) and parsing. Sentence segmentation is to
split the given user story into small sentences. Tokenization is performed to split given text
into tokens (words). Then, the tokens are normalized (such as, removing ing,ed endings from
verbs, making all plural words singular ones, making all verbs be in present tense, remove stop
words). POS tag is the process of assigning one of the parts of speech to the given word (such
as nouns, verb, adverbs, adjectives, pronouns and conjunction). Parsing can be used to generate
constituency and dependency parses of sentences and returns a phrase structure tree.</p>
        <p>The component completeness analysis takes the keywords (As a, I want to, etc) in the story
document as the feature words, and identifies the user story components: role, intention and
reason. In this analysis phase, we check the quality criteria of well-formed and uniformity.
• Well-formed check: After using the NLP of sentence segmentation and tokenization, the
components of “As a", “I want to", “so that" will be split from a user story. Then, if the
components of “As a", “I want to" are missing, this criterion is considered to be violated.
• Uniformity check: User story keywords are checked here, if words other than the
recommended user story keywords (“As a", “I want to", “so that") are used, it is considered a
violation of this criterion.</p>
        <p>The testability analysis regards each key field as a sentence, and uses natural language
analysis technology to identify the components of each sentence. We have established a fuzzy
thesaurus, which can be identified according to word segmentation, part of speech tagging and
parsing.</p>
        <p>• Full sentence check: The judgment basis of language full sentence is to check whether
the sentence contains the language components that should completely express the field.
For example, the field information behind the I want to keyword should represent an
action or state. When the action and state information cannot be extracted from this field
information, it is considered that the expression may have the defect of full sentence.
• Atomicity check: atomicity requires that the expression intent field contains only one
function description. This paper considers that meeting one of the two rules violates:
1. The sentence contains the conjunction "and, or" and so on.
2. Dependency grammar analysis is used to identify sentence components. There are
two core verbs in the sentence expressing intention.
• Minimal check: minimization mainly checks whether the "intention" field contains
parentheses and other remarks. When parsing the intention field, this paper analyzes the
statements between the parentheses"( ), [ ], ‹›". If the statements contain selective
information. It is considered that the minimization criterion is violated.
• Unambiguous check: if the words in the current sentence appear in the fuzzy thesaurus,
it violates the unambiguous defect.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. User story quality analysis based on iStar Models</title>
        <p>
          For checking the quality criteria in consistency analysis phase, we use an approach based on
iStar model analysis. Firstly, iStar models need to be generated by our previously proposed
approach based on node merging [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. The process of this iStar model generation consists
of three steps: identifying iStar models nodes (i.e., role, goal/task, quality) from user stories,
merging similarity nodes and identifying iStar models edges (i.e., refinement, mean-end and
contribution) from nodes. In this process, the concept attributes in user stories are identified,
and then their relationships will be found between these concepts. In the iStar models, similar
concepts (nodes) and conflicting relationships (edges) can be checked using rule-based methods.
The detection of quality criteria for consistent perspective is based on this idea.
• Uniqueness check: as shown in Figure 2 (a), given two user stories US1 and US2, if the
goal/task nodes after "I want to" are merged and the the goal/task nodes after "so that"
also are merged, we consider that it may violate the uniqueness criterion.
• Conflict-free check: as shown in Figure 2 (b), given two user stories US3 and US4, if the
goal/task nodes after "I want to" in user stories US3 and US4 are merged, but the two
goal/task nodes after "so that" are refinement relations, we consider that it may violate
the conflict-free criterion.
• Estimable check: in the iStar models, if there are some isolated nodes, i.e., it has no
connections to other nodes, and has no refinement or contribution relationships, we
consider that it may violate the estimable criterion.
• Independence check &amp; Conceptually sound check: as shown in Figure 2 (c), given user
stories US5 and US6, if the node after "I want to" in US5 points to the merged node (the node
after "so that" in US5 and the node after "I want to" in US6 are merged), and the merged
node points to the node after "so that" in US6 and generate refinement relationships, we
consider that it may violate the independence or conceptually sound criterion.
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusions</title>
      <p>This paper proposes a user story quality assessment framework from multi-dimensional
perspectives. 11 quality criteria are used to observe the quality defects in a set of user stories
and these criteria are classified three diferent perspectives from requirements quality analysis
point. There are completeness, testability and consistency. To check these quality criteria in
the 3 perspectives, we propose using the NLP based approach and the iStar model analysis
based approach. The NLP based approach identify the quality criteria from an individual user
story. While, the iStar model analysis can find the quality defects between user stories. The
framework proposed in this paper is able to assess user story quality from a syntactic and
semantic perspective. The approach in this paper will provide feasible solutions for user story
quality inspection and improvement.</p>
      <p>As for our next step work, we plan to develop a prototype tool that implements our proposed
framework. In addition, we will conduct extended experiments on more data sets to verify the
efectiveness of the proposed approach.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Acknowledgments</title>
      <p>This work is supported by the National Natural Science Foundation of China (No.62162051), the
Project of Beijing Municipal Education Commission (No.KM202110005025), the Natural Science
of Foundation of Inner Mongolia Province (No.2021MS06024) and the research start-up funding
project of Inner Mongolia Normal University (No. 2020YJRC057).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>P.</given-names>
            <surname>Heck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Zaidman</surname>
          </string-name>
          ,
          <article-title>A quality framework for agile requirements: A practitioner's perspective, Eprint Arxiv (</article-title>
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>P.</given-names>
            <surname>Heck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Zaidman</surname>
          </string-name>
          ,
          <article-title>A systematic literature review on quality criteria for agile requirements specifications</article-title>
          ,
          <source>Software Quality Journal</source>
          <volume>26</volume>
          (
          <year>2018</year>
          )
          <fpage>127</fpage>
          -
          <lpage>160</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>G.</given-names>
            <surname>Lucassen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Dalpiaz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. M. E. van der</given-names>
            <surname>Werf</surname>
          </string-name>
          , S. Brinkkemper,
          <article-title>Forging high-quality user stories: Towards a discipline for agile requirements</article-title>
          , in: IEEE,
          <year>2015</year>
          , pp.
          <fpage>126</fpage>
          -
          <lpage>131</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>C.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Jin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Cui</surname>
          </string-name>
          ,
          <article-title>An approach for improving the requirements quality of user stories</article-title>
          ,
          <source>Computer Research and Development</source>
          <volume>58</volume>
          (
          <year>2021</year>
          )
          <fpage>731</fpage>
          -
          <lpage>748</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>C.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <article-title>A preliminary framework for constructing istar models from user stories</article-title>
          ,
          <source>iStar Workshop</source>
          (
          <year>2021</year>
          )
          <fpage>35</fpage>
          -
          <lpage>41</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>C.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhai</surname>
          </string-name>
          ,
          <article-title>A node-merging based approach for generating istar models from user stories</article-title>
          ,
          <source>Software Engineering and Knowledge Engineering</source>
          (
          <year>2022</year>
          )
          <fpage>257</fpage>
          -
          <lpage>262</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>W. B</surname>
          </string-name>
          ,
          <article-title>Invest in good stories, and smart tasks (</article-title>
          <year>2003</year>
          ). Https://xp123.com/articles/invest
          <article-title>-ingood-stories-and-smart-tasks.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>G.</given-names>
            <surname>Lucassen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Dalpiaz</surname>
          </string-name>
          ,
          <string-name>
            <surname>J. M. E. M. van der Werf</surname>
          </string-name>
          , S. Brinkkemper,
          <article-title>Improving agile requirements: the quality user story framework and tool</article-title>
          , Requirements Engineering (
          <year>2016</year>
          )
          <fpage>383</fpage>
          -
          <lpage>403</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>J.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Han</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Shen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Miao</surname>
          </string-name>
          ,
          <article-title>Using goal net to model user stories in agile software development</article-title>
          ,
          <source>in: 15th IEEE/ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (SNPD)</source>
          ,
          <year>2014</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>6</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wautelet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Heng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kolp</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Mirbel</surname>
          </string-name>
          ,
          <article-title>Unifying and extending user story models</article-title>
          ,
          <source>Part of the Lecture Notes in Computer Science book series (</source>
          <year>2014</year>
          ) volume
          <volume>8484</volume>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>