• Nenhum resultado encontrado

Software and systems engineering

N/A
N/A
Protected

Academic year: 2022

Share "Software and systems engineering"

Copied!
66
0
0

Texto

(1)

Software and systems engineering

Paulo Borba

Informatics Center

Federal University of Pernambuco

phmb@cin.ufpe.br ◈ twitter.com/pauloborba

(2)

Communication

spg-ufpe.slack.com

#general, #naaula

if682-cc-l@

phmb@ (com [ESS] no subject)

(3)

First day at work

(4)

Requirements

(5)

Who are the

stakeholders?

(6)

What do the

stakeholders require

from the system?

(7)

Not properly

answering these

questions often leads to productivity and

quality problems!

(8)

https://www.linkedin.com/pulse/thanks-we-too-busy-daniel-white

(9)

What functionalities do the stakeholders

require from the system?

functional requirements

(10)

What quality factors do the stakeholders

require from such functionalities?

non-

functional requirements

(11)

Focus on what the

system should do, not

on how it should do!

(12)

Two main activities

Requirements elicitation

Requirements specification

(13)

Requirements

elicitation

(14)

Interacting with stakeholders

Interviews

Lo-Fi GUI sketches and storyboards

Stakeholders as part of the development team

(15)

Process, initial phase

Goal is to understand stakeholders needs

Initial questions:

What do you expect from the system?

Main functionalities?

Involved quality factors?

Group functionalities into features

For each functionality, discuss specific usage scenarios

(16)

Process, refinement

Ask more questions so that

scenarios can be latter detailed, and

new (dependent) features are identified

Draw and discuss Lo-Fi GUI sketches and storyboards

Confirm expectations

Refine

(17)

Do not focus on trivial usage scenarios

Focus on more relevant (for both the stakeholders and the project) and

complicated

requirements, rules,

constraints, event sequences,

cases, etc.

Avoid redundancy

(18)

Contact stakeholders

right after the class, and

set up a meeting!

(19)

Two main activities

Requirements elicitation

Requirements specification

(20)

Requirements

specification

(21)

Feature (user story)

Feature: journal article

As a member of a research group

I want to add, remove and modify journal articles I have published so that I can generate web pages and reports containing these articles

(22)

Feature template

Feature: [name]

As a [kind of stakeholder]

I want to [do some task]

so that [I can achieve some goal]

(23)

Feature scenarios

Scenario: new article

Given the system has no article entitled

"A theory of software product line refinement"

When I create the article "A theory of software

product line refinement" with file name "TCS.pdf"

Then the article "A theory of software product line refinement" is properly stored by the system

(24)

Focus on concrete execution scenarios

Testing bias

Scenarios will be latter used as tests

(25)

Feature scenarios format

Scenario: duplicate article

Given the article "A theory of software product line refinement" is stored in the system with file name "TCS-0.pdf"

When I create the article "A theory of software

product line refinement" with file name "TCS-1.pdf"

Then the article "A theory of software product line refinement" is not stored twice

(26)

Feature scenarios, extreme cases

Scenario: new article empty

Given the system has no article entitled ""

When I try to create the article "" with file name “TCS12.pdf”

Then the article "" is not stored by the system

(27)

Better specifying system behavior

Note the need to complement

success cases with failure cases, and

corner cases with typical cases

We could also better specify the effect to other state elements and what happens

when

similar titles are used

not all article information is duplicated

(28)

Service (or controller) scenarios

No mention to user interface elements, abstractions, or navigation

Focus on system services, actions

Focus on effects to the internal system

state, nor to the system user interface state

Often specify implicit requirements

Complement user interface scenarios

(29)

Write a couple of

service scenarios for a

chosen feature

(30)

Given todas as vagas estão ocupadas When Eu tento reservar uma vaga

Then O sistema não faz nenhuma reserva Given tem apenas a vaga “11” livre

When Eu tento reservar uma vaga

Then O sistema reserva a vaga “11” para mim Given “Eduardo” esteja logado no sistema, sem registro de idoso

And as vagas preferenciais sejam as “11” e “2016”

And apenas as vagas “11”, “2016” e “6” estejam livres When Eu tento reservar uma vaga

Then O sistema reserva a vaga “6” para mim

(31)

RQ1: The system computes average MA when a student has achieved concepts MPA, MPA, MA.

Scenario: compute average for concepts MPA, MPA, MA Given The student “João Vasconcelos” has achieved “MPA, MPA, MA” for goal “Write Requirements in Gherkin

format”

When I ask for “João Vasconcelos” average on goal “Write Requirements in Gherkin format”

Then “João Vasconcelos” average for goal “Write Requirements in Gherkin format” is “MA”

(32)

RQ1: O sistema deve armazenar as publicações carregadas, mesmo que a mesma publicação apareça nos currículos de mais de um pesquisador analisado

Scenario: armazenar publicações repetidas

Given que o pesquisador “Paulo" tem o artigo “A refinement theory"

When eu tento carregar o currículo de “Leopoldo”, com o artigo “A refinement theory"

Then O sistema armazena o artigo “A refinement theory"

de “Leopoldo"

And mantém o artigo “A refinement theory” de "Paulo"

(33)

GUI based scenario

Scenario: new article web

Given I am at the “New Article Page"

When I create the article “A refinement theory"

Then I can see a confirmation message

(34)

Focus on concrete execution scenarios

Testing bias

Scenarios will be latter used as tests

(35)

GUI based scenario, with Ands

Scenario: new article web

Given I am at the "publications" menu When I select the "Article" option

And I create the article “X" published in "2016"

Then I can see a confirmation message

And I can see the saved article information “X" and year "2016"

(36)

Avoiding low (abstraction) level actions in scenarios

Scenario: Add a new article and try to tweet the article using wrong login and password

Given I am logged as "admin"

And I am at the "Article" Page

When I try to create an article named “Refinement…”

with filename "TCS-102.pdf"

And Share it in Twitter with "phmb"

and “password-weak"

Then No tweet should be post about "Refinement…"

(37)

Declarative (not

imperative) scenarios!

(38)

User interface scenarios

Directly refer to user interface elements, events, and navigation, but in an abstract way

Focus on overall, visible, system behaviour

Focus on effects to the system user interface state, not internal system state

Often specify explicit requirements

Think about sequence of snapshots of a particular, concrete, use of the system

Complement service scenarios

(39)

Write a couple of

scenarios for a chosen

feature

(40)

RQ1: O sistema deve armazenar as publicações carregadas, mesmo que a mesma publicação apareça nos currículos de mais de um pesquisador analisado

Scenario: armazenar publicações duplicadas, GUI

Given que eu estou na página que de publicações do pesquisador “Paulo"

And eu vejo o artigo “A refinement theory"

When eu tento carregar o currículo de “Leopoldo" com o artigo “A refinement theory"

Then Eu vejo uma mensagem de confirmação

And O artigo “A refinement theory” aparece na lista de publicações de "Leopoldo"

(41)

RQ1: Na totalização das publicações, o sistema deve contar apenas uma vez a mesma publicação que aparece nos

currículos de mais de um pesquisador analisado Scenario: totalização com publicações repetidas Given “Leopoldo” tem "5" artigos

And “Paulo” tem "7" artigos

And “Leopoldo” e “Paulo” têm apenas “1" artigo em comum

When eu solicito a totalização dos currículos de

“Leopoldo” e “Paulo"

Then eu vejo a totalização de “11" artigos

(42)

What is wrong here?

Scenario: Adicionar Atleta novo web Given estou no menu de Atletas

   When eu seleciono a opcao "Adicionar"

   And eu preencho os dados do atleta

   And o atleta nao esta armazenado no sistema    And eu seleciono a opcao "Cadastrar"

   Then eu posso ver uma mensagem de confirmacao

(43)

OK now!

Scenario: Adicionar Atleta novo web Given estou no menu “Atletas"

And o atleta de CPF “08976898765” não aparece na lista de atletas cadastrados

   When eu seleciono a opcao "Adicionar"

   And eu tento cadastrar o atleta “João”

com CPF “08976898765"

   Then eu posso ver uma mensagem de confirmação

And eu vejo o nome “João” e CPF “08976898765” na lista de atletas do sistema

(44)

Requirements specification

Set of features

Each feature has

a set of service scenarios

a set of user interface scenarios

assumes further interaction among

stakeholders not enough

information

(45)

But how many, and which, scenarios?

Aim for coverage of more relevant scenarios

A few basic scenarios for smoke tests

Aim for consistency, completeness is hard

SMART

specific, measurable, achievable, relevant, and timeboxed

(46)

Focus on functional requirements

Robustness might be hard (When … And there is a connection error … Then)

Concurrency too (When two users try to add “John" to the system… Then…)

Either positive or negative (When…Then the system should not …), no matter if

success or failure scenario

(47)

Checklist

(48)

Scenarios should reflect the stakeholders needs

Scenario: Generate member details report in XML Given the system has some member details

When I request to export to XML those details

Then a formatted XML containing the member details in appropriate tags named "c.xml" will be generated and stored in the computer

(49)

Scenario description should strictly correspond to scenario semantics

Scenario: new article web

Given I am at the "publications" menu When I select the "Periodico" option...

And I select the "new article" option ...

Then I can fill the article details

not really storing the article and checking that

(50)

Look for short scenario steps sentences (use And as needed)

Scenario: remove existing article web

Given I am at the articles page and the article "..."

is stored in the system with file name "..."

When I select to view ...

Then the article details are showed and I can select the option to remove

And the message…

And could be

used to split the Given and Then steps

(51)

Do not duplicate scenario steps

Given the system has article entitled "A theory of software product line refinement" with file name

"TCS-44.pdf"

Given the article "A theory of software product line refinement" is stored in the system with file name

"TCS-0.pdf"

(52)

Do not duplicate scenarios

Scenario: export multiple members to XML link not enabled when there are no member selected

Scenario: export multiple members to PDF link not enabled when there are no member selected

Scenario: export multiple members link not enabled when there are no member selected Given I am at the member list page

And the system has no checked member

Then I cannot select any of the export options

(53)

Scenario should not be vague or incomplete

Scenario: upload publications with a file

Given the system has some publications stored When I upload the publications of "c.xml"

Then the system has all the publications of the xml file

And the existing publications were not affected

(54)

Scenario should not be vague or incomplete

When I select the "view details" option at the Member list

And I can select the option Export to PDF at the Member view

Then I can generate a PDF report about the selected Member details

And View a PDF file with the member personal details

(55)

Parametrize scenario steps

When I select the "view details" option at the Member list

And I can select the option Export to PDF at the Member view

Then I can generate a PDF report about the selected Member details

And View a PDF file with the member personal details

thinking in

advance about step implementation

(56)

Specify actions, not non actions or empty actions

When I do not upload any file

Given I am at any page

Then I see my name and a link to logout

(57)

Avoid language errors

And View a PDF file with all memeber's personal details

And View a PDF file with the member personal details

(58)

Use high level actions

When I select the XML file "c.xml" containing a publication entitled "A theory of software

product line refinement" through the button "Escolher arquivo"

And I click the button "Enviar"

When I ask the system to load the XML file "c.xml" containing a publication entitled "A theory of software product line

refinement"

(59)

Write platform

independent scenarios

Then no publications are stored by the system And the system shows the message

"No valid XML file was uploaded."

Then no publications are stored by the system And the system shows an error message

(60)

Focus on testing situation, direct to the point

Given I created one article named "A theory of software product line refinement"

And the article "A theory of software product line refinement" is stored with the file name

"TCS.pdf"

Given The article "A theory of software product line refinement" is stored with the

file name "TCS.pdf"

(61)

Focus on testing situation, not general requirement

Given I am at any page When I double click

Then I can see a help message

Given I am at the “Article" page When I ask for help

Then I can see a help message related to article creation

(62)

Requirements, going beyond

Functional versus non-functional

Elicitation versus specification

Specification approaches

goal model

feature model

requirement list

use case model

scenarios

(63)

Requirements documents

http://dioscuri.sourceforge.net/docs/URD_Dioscuri_KBNA_v1_1_en.pdf

(64)

Expertise Levels

Basic interviewing skills and requirements documents

Scenarios and features

NFR and more advanced interviewing and ethnomethodological skills

Goal models

(65)

Requirements research at CIn

Goal models: Jaelson, Carla

Software product lines and ecosystems:

Jaelson, Carla, Carina

Business process modelling: Carina

(66)

Software and systems engineering

Paulo Borba

Informatics Center

Federal University of Pernambuco

phmb@cin.ufpe.br ◈ twitter.com/pauloborba

Referências

Documentos relacionados

Para além do que possa ser questionado em termos do embate entre aluno e autoridade pedagógica, as mútiplas interrogações deste e outros fenómenos, convidam à desmontagem de

The ontology- based approach was used to define the robot, the machine vision system, and the tasks that were needed to be performed by the robotic system.. The robotic system

1) Que o estudo se destina a mostrar a prevalência de cardiopatias congênitas por meio do oximetro de pulso ou teste do coraçãozinho. 3) Que os resultados que se desejam

If that Member or Associate Member and the Members or Associate Members elected to both the Vice Presidencies at the preceding session of the Conference are absent, the President of

Little reuse and agility, high costs.. Even

• “…Se puder verificar equipes incompletas no início da próxima aula seria uma mão

To control scope, we need to manage a list of tasks... To control time, we need to manage

tre de 2018, no Brasil, 41% das famílias entrevis- tadas divergiram do desejo do potencial doador e não autorizaram a captação. Esse cenário justifica e subsidia discussões