Refactor the BDD test scenarios to verify the state of an AWS Cloud instance after launching

Created on 31 August 2023, over 1 year ago
Updated 5 September 2023, over 1 year ago

Problem/Motivation

  • While running the BDD scenario, the Amazon EC2 instance sometimes spins up quickly after launching.
    And I should see "pending" in the "BDD_Instance_07lQUl" row
  • Found a row containing BDD_Instance_07lQUl, but it did not contain the text pending. (RuntimeException)
      @api
      Scenario: Launch an EC2 instance                                                 # features/tmp.20220930_182600.07lQUl/AWS-ATDD-02-04-LaunchInstances.feature:5
        Given I am logged in as user "BDD_user_07lQUl"                                 # Drupal\DrupalExtension\Context\DrupalContext::iAmLoggedInAsUser()
        When I visit "/clouds/design/server_template/bdd_aws_07lqul_ap_northeast_1"    # Drupal\DrupalExtension\Context\MinkContext::assertAtPath()
        And I click "BDD_Instance_07lQUl"                                              # Drupal\DrupalExtension\Context\MinkContext::assertClick()
        And I should see the heading "BDD_Instance_07lQUl"                             # Drupal\DrupalExtension\Context\MinkContext::assertHeading()
        And I click "Launch"                                                           # Drupal\DrupalExtension\Context\MinkContext::assertClick()
        And the url should match "/launch"                                             # Drupal\DrupalExtension\Context\MinkContext::assertUrlRegExp()
        And I check the box "Automatically terminate instance"                         # Drupal\DrupalExtension\Context\MinkContext::assertCheckBox()
        And I press "Launch"                                                           # Drupal\DrupalExtension\Context\MinkContext::pressButton()
        Then I should be on "/clouds/aws_cloud/bdd_aws_07lqul_ap_northeast_1/instance" # Drupal\DrupalExtension\Context\MinkContext::assertPageAddress()
        And I should see the success message "has been launched"                       # Drupal\DrupalExtension\Context\MessageContext::assertSuccessMessage()
        And I should see "pending" in the "BDD_Instance_07lQUl" row                    # Drupal\DrupalExtension\Context\DrupalContext::assertTextInTableRow()
          Found a row containing "BDD_Instance_07lQUl", but it did not contain the text "pending". (RuntimeException)
        β”‚
        β”‚  Screenshot at: sites/screenshots/093022-113646_AWS-ATDD-02-04-LaunchInstances_16F.html
        β”‚
        └─ @AfterStep # Drupal\DrupalExtension\Context\DrupalContext::takeScreenshotOnFailure()
    
πŸ“Œ Task
Status

Fixed

Version

6.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024