Write Feature File/s for Default Node view: project_issue_user_projects(Your Projects), as an authenticated user. Path: /project/user

Comments

pradeeprkara’s picture

Assigned: Unassigned » pradeeprkara
Issue tags: +sprint 3
pradeeprkara’s picture

The queries form "Search for" text field is not yielding any expected results;
Is the search functionality broken here?

senpai’s picture

Hmm, it might be. Please indicate the URL you're using, and the search term your entering, and the expected results, and I'll have the ApacheSolr Team take a look at this issue.

pradeeprkara’s picture

Status: Active » Postponed

As git6site user logins are not working because of the db reset(http://drupal.org/node/1720134), postponing this for now and will come back once it is fixed.

pradeeprkara’s picture

Status: Postponed » Postponed (maintainer needs more info)
kssundar’s picture

pradeeprkara’s picture

Status: Postponed (maintainer needs more info) » Active

resuming

pradeeprkara’s picture

Below is the search url which doesn't yield any results even though an issue exists with the name as that in the query string

http://git6site.devdrupal.org/project/user?text=Test+Project+Two&status%...

Use git vetted user login for testing

senpai’s picture

Check and see if that expected content has been indexed by core search. (I've been told that it doesn't appear to be a solr thing)

pradeeprkara’s picture

Status: Active » Needs review
eliza411’s picture

Assigned: pradeeprkara » sdboyer
Status: Needs review » Needs work

@sdboyer: How often is cron being run on git6site (if ever)?

Regular site search won't index content until cron is run. The url pradeep pasted above indicates the test is checking to see that a newly created issue is found in the issue search, which seems like a meaningful test (at least I've had plenty of sites where cron quits running properly and content isn't indexed).

Once solution, assuming this is indeed the problem, could include running cron as a step in the test. The git vetted user won't be able to do this, though, so it's another situation where we either have sequentially dependent feature files or the test should be run by the 'admin test' user. afaik, the issue search functionality should be validly testable by either user.

Ideally, one might also like to validate that site search indexing is being run on the expected schedule and behaving as expected. Waiting for 1 hour or whatever the schedule is on a test seems fairly silly, though.

Thoughts?

sdboyer’s picture

Status: Needs work » Postponed

the issue here is probably that, due to running out of space on the db server, we removed the search index for issues (which is still in the db, not solr). that saved 11GB. dww brought this problem up, and i imagine it's what we're seeing now.

i'm gonna leave this as postponed for now, as reincluding those tables in the db dump could easily result in overfilling our db servers again.

sdboyer’s picture

oh, and it looks like cron wasn't running at all on git6, not since the migration. i've turned it back on, in 15 minute increments.

pradeeprkara’s picture

Since the inputs from "Search for" field only is not giving results, I have commented the step for the same.

#the below step doesn't work for git6site
#And I fill in "Search for" with Project Name

Attached is the patch. Once the search issue is fixed, will uncomment and roll out another one.

eliza411’s picture

Assigned: sdboyer » Unassigned
Status: Postponed » Needs work

Looks like one spot got missed or depends on something not yet committed in features/project/your_projects.feature

    And I press "Search" in the "content" region                                                 # FeatureContext::iPressInTheRegion()
      Notice: Undefined property: FeatureContext::$content in features/bootstrap/FeatureContext.php line 1781
pradeeprkara’s picture

Issue tags: +sprint 4

tagging for sprint 4

pradeeprkara’s picture

Assigned: Unassigned » pradeeprkara

assigning to myself

pradeeprkara’s picture

Status: Needs work » Needs review
StatusFileSize
new16.98 KB

The above error (#15), is probably due to the updates in Branch,
Recreated and attached the patch.

eliza411’s picture

Status: Needs review » Needs work
+++ b/features/project/your_projects.feature
@@ -0,0 +1,117 @@
+Feature: Your Project Tab
+  In order to check the Projects created
+  As an authenticated user
+  I should be able to view the Projects created by the user and the issues associated

Add the actual business value and the right type of user:

  In order to easily manage the projects I've created
  As a project maintainer
  I should be able to find a list of projects and their associated issues in a central location.
+++ b/features/project/your_projects.feature
@@ -0,0 +1,117 @@
+    Given that I am on the homepage

This should be replaced with

    Given I am logged in as "git vetted user"
    And I follow "Your Dashboard"
    And I follow "Your Projects"

For every following scenario, all of the following should be deleted:

+    When I follow "Log in / Register"
+    And I am logged in as "git vetted user"
+    And I follow "Your Dashboard"
+    And I follow "Your Projects"

and the subsequent step should begin with When (unless it's an oddball one where you're just verifying all the data is present)

pradeeprkara’s picture

Status: Needs work » Needs review
Issue tags: +sprint 5

Updated the features as suggested. As there is no corresponding action involved, I have removed When from some of the scenarios(Eg: Scenario: Check the links in Project Table)

Also splitted some of the scenarios which had multiple actions to keep it simple.
Eg:
Scenario: Check View link from Issue Links column for Projects
and
Scenario: Check Search link from Issue Links column for Projects

You can find below the modified features, once confirmed, will roll out a patch.

Commit log: ded9c10

eliza411’s picture

I think the more granular steps are appropriate here.

On a content level (correct me if I'm wrong), I'm seeing that these scenarios assume that data exists, but that data won't upon a fresh copy of the database is put in place (which will happen every time code is integrated) so this will fail in a continuous integration environment.

I've opened a meta issue on the topic #1742962: [meta] Create data for tests

eliza411’s picture

Status: Needs review » Needs work

Setting to needs work / postponed may be appropriate, too.

pradeeprkara’s picture

Status: Needs work » Postponed (maintainer needs more info)

Postponing, will resume once #1742962: [meta] Create data for tests is resolved

pradeeprkara’s picture

Issue tags: +sprint 6

copied the steps from patch to dev

eliza411’s picture

Status: Postponed (maintainer needs more info) » Active

Since it appears that we'll be handling data set up in the background steps, would you revisit this and see if you can finish it now?

pradeeprkara’s picture

Issue tags: +sprint 7

sure, I will put the necessary steps to have the test data ready in the initial scenarios.

Tagging.

pradeeprkara’s picture

Title: Write Feature File/s for Default Node view: project_issue_user_projects(Project issue) » Write Feature File/s for Default Node view: project_issue_user_projects - Project issue(your_projects.feature)
Status: Active » Needs review

Added scenarios to create sandbox project, project and project issue.

As the issue title was hard coded in your_projects_feed.feature, merged scenario to your_projects.feature so that internally it will look for the test issue title.

As issue search is fine now, incorporated corresponding steps as well.

Please see the commit: 9b6efa6

@important
Now we experience a timeout issue for /project/user, probably due to the huge number of test projects appear on that page?

eliza411’s picture

If you want to delete a bunch of those with the admin test account to see if it helps, that's the best I can suggest until we're getting more regular database refreshes. We don't really have the access we'd need to efficiently delete them after tests run, I don't think.

eliza411’s picture

Title: Write Feature File/s for Default Node view: project_issue_user_projects - Project issue(your_projects.feature) » Write Feature File/s for Default Node view: project_issue_user_projects - Project issue ( your_projects.feature )
Status: Needs review » Needs work

If you can have these clean up after themselves, that would be ideal; if access is a problem, then don't bother.

In the meantime, we're getting three failures:

 Scenario: Check the links in Project Table                                             # features/project/your_projects.feature:40
    And I am on "/project/user"                                                          # FeatureContext::visit()
    Then I should see the following <links> in column "Issue links" in "Projects" table  # FeatureContext::iShouldSeeTheFollowingLinksInColumnInTable()
      | links  |
      | View   |
      | Search |
      | Create |
    And I should see the following <links> in column "Project links" in "Projects" table # FeatureContext::iShouldSeeTheFollowingLinksInColumnInTable()
      | links       |
      | Edit        |
      | Add release |
      The link: "Add release" cannot be found in column: "Project links"

  Scenario: Check Add release link from Project Links column for Projects                # features/project/your_projects.feature:72
    And I am on "/project/user"                                                          # FeatureContext::visit()
    When I click "Add release" from "Projects" table                                     # FeatureContext::iClickFromTable()
      The link couldn't be visited.
    Then I should see "Create Project Release" page                                      # FeatureContext::iShouldSeePage()



  Scenario: Check Issue search                                                                   # features/project/your_projects.feature:108
    And I am on "/project/user"                                                                  # FeatureContext::visit()
    When I fill in "Search for" with Project Name                                                # FeatureContext::iFillInWithProjectName()
    And I select Project Name from "Project"                                                     # FeatureContext::iSelectProjectNameFrom()
    And I press "Search" in the "content" region                                                 # FeatureContext::iPressInTheRegion()
    Then I should see at least "1" record in "Project Issues" table                              # FeatureContext::iShouldSeeAtLeastRecordsInTable()
      The table: "Project Issues" cannot be found

pradeeprkara’s picture

Status: Needs work » Needs review

The scenarios except "Check Issue search" work for me. This failure is due to the issue mentioned in Comment #2. This was working fine until the last db refresh; tagged the scenario as @wip for now.

Added @clean_data tag(to delete test data)

The commit: a190921

eliza411’s picture

Status: Needs review » Needs work

I spent some time on the broken scenario today, and it seems to me that there's a fundamental problem with it:

  Scenario: Check Issue search
    And I am on "/project/user"
    When I fill in "Search for" with Project Name
    And I select Project Name from "Project"
    And I press "Search" in the "content" region
    Then I should see at least "1" record in "Project Issues" table

Instead of filling in "Search for" with the project name, I think you should be searching on the title of an issue (or text within an issue).

pradeeprkara’s picture

Issue tags: +sprint 9

tagging

pradeeprkara’s picture

Status: Needs work » Needs review

Its fine when search is being performed with issue name.
Changed steps accordingly.

But the test issue created afresh is not being captured and it takes nearly 15 minutes to get it indexed.
Committed the changes keeping @wip tag.

The commits: 8e2a6ab, 6e717ce

eliza411’s picture

Status: Needs review » Fixed
  1. I tagged the scenarios that were dependent on test data with @dependent
  2. In http://drupalcode.org/project/doobie.git/commit/a3e619b I added a call to cron to allow the searches succeed. tagged this scenario slow because it is
  3. I split the sandbox and full project tests into separate files for readability and to simplify troubleshooting in the event of failures due to new functionality

    http://drupalcode.org/project/doobie.git/commit/33c3922

    http://drupal.org/node/1712286

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

Anonymous’s picture

Issue summary: View changes

edited description