Skip to content

Regex Definition

2000eBe edited this page Apr 27, 2023 · 9 revisions

1. Regex Definition use-Case v. 1.0

1.1 Brief Description

With this use case the user can search for specific text/values on the provided media stream. The Media Stream is either the whole screen, an application windows or a specific region which the user cut out and selected. Which is similar to a CRUD system but adding the properties of the created capture area and what values we are searching for and updating constraints and more options.

2. Flow of Events

2.1 Basic Flow

The flow how to enter a Regular Expression is quite simple explained.

  1. You select the input field where you can enter the Value(s) you want to search for in the Screen recording.
  2. Then the System will check if you entered regular expression is a valid one, then either a warning message will be displayed that the entered expression is not a valid regular expression, or you will get notified that your expression is correct, and you can proceed with the next steps.
  3. Now you can specify the “location” of the value you want to find, to clearly narrow down the search of the regular expression. This can be achieved through many ways.
  4. After the Steps 1 – 3 you can save the regular expression.

2.2 Activity Diagram

2.3 Feature Files

Feature: Use Case Regex Definition
  As a user
  I want to be able to see all create new capture areas and then add, remove 
  and edit regular expressions for each capture area. 
  Additionally I want to execute the regular expression which are defined 
  for each capture area on a given media stream.

  Scenario: There are no capture areas defined
    Given there are no capture areas defined
    When I open the regular expression definition panel
    Then I see a message that no capture areas are defined
    Then I see a button to create a new capture area

  Scenario: I want to see all the regexes for a capture area
    Given I have a capture area
    When I view the capture area
    Then I should see all the regexes for the capture area

  Scenario: I want to add a regex to a capture area
    Given I have a capture area
    When I add a regex to the capture area
    Then I should be able to specify the regex for the capture area
    And I should see the regex in the list of regexes for the capture area

  Scenario: I want to remove a regex from a capture area
    Given I have a capture area
    And I have a regex for the capture area
    When I remove the regex from the capture area
    Then I should not see the regex in the list of regexes for the capture area anymore

  Scenario: I want to edit a regex for a capture area
    Given I have a capture area
    And I have a regex for the capture area
    When I edit the regex for the capture area
    Then I should be able to specify the regex for the capture area
    And I should see the regex in the list of regexes for the capture area

  Scenario: I want to execute a capture area on a media stream
    Given I have a capture area selected
    And I have a defined regex for the capture area defined
    When I execute the regex for the capture area
    Then I should see the result of the regex execution

2.4 Mock-up

2.4.1 Initial draft

This was the first draft of creating the regex definition area.

2.4.2 First design iteration

After another design iteration, we landed on this design, which will probably be just a temporary solution, because there probably are many things we didn't consider into this design iteration.

2.4.3 MVP design

We finally settled on a design which is perfect for the MVP.

image

2.5 Functional Points Calculation

grafik

3. Special Requirements

(n/a)

4. Preconditions

4.1 Screen/Window is selected

To enter a Regular Expression into the user interface, a screen/windows has to be selected. Or even better a specific region in that window is selected therefore the OCR (Optical Character Recognition) software can better detect and analyse the text and properly apply regular expressions on it.

5. Postconditions

(n/a)

6. Extension Points

(n/a)