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()
    

Issue fork cloud-3384450

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nakamurarts created an issue. See original summary.

phyllanthus’s picture

Status: Active » Needs review
yas’s picture

Title: Verify the state of an AWS Cloud instance after launching it » Refactor the BDD test scenarios to verify the state of an AWS Cloud instance after launching
Issue summary: View changes
Status: Needs review » Needs work

@nakamurarts

Thank you for the refactoring. Please add the same to https://git.drupalcode.org/project/cloud/-/blob/6.x/modules/cloud_servic...

Thanks

phyllanthus’s picture

Status: Needs work » Needs review

@yas

Thank you for the review.

Sorry for the delayed response. I have made the same correction in other parts.

yas’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

@nakamurarts

Thank you for the update. It looks good to me now. I'll merge the patch to 5.x and 6.x, and close this issue as Fixed.

  • yas committed 047fb4cd on 6.x authored by nakamurarts
    Issue #3384450 by nakamurarts, yas: Refactor the BDD test scenarios to...

  • yas committed b40485f4 on 5.x authored by nakamurarts
    Issue #3384450 by nakamurarts, yas: Refactor the BDD test scenarios to...
yas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.