Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find my spec file #40

Open
Russell108 opened this issue Oct 26, 2018 · 9 comments
Open

cannot find my spec file #40

Russell108 opened this issue Oct 26, 2018 · 9 comments

Comments

@Russell108
Copy link

Russell108 commented Oct 26, 2018

No description provided.

@Russell108
Copy link
Author

Russell108 commented Oct 26, 2018

I cannot understand what is going on. in the first part of the grading ie default profile & why I loose 20 marks. On my Local machine everytimg passes.

In fact I have tried many ways to get this home work to pass it is very specific regarding rspec but this seems like a cucumber issue but later by disabling the profiles it all passes.

I did alter web_steps.rb but have reverted this to default

Your submission was recorded at 2018-10-26 11:14:46 +0000 : submission is on time.
Score: 80.0/100.0
----------------------------------------
Running student tests found in features/ spec/:
Using the default profile...
0 scenarios
0 steps
0m0.000s
Coverage report generated for Cucumber Features to /home/ubuntu/rag/submissions/dfaba4421e72798c347dbec8233e880c/assignment4/2018-10-26-11-14-47/coverage. 0.0 / 0.0 LOC (100.0%) covered.

  Cucumber: 0 out of 0 scenarios passed
  RSpec: 18 out of 18 tests passed
  Score: 20/40
----------------------------------------

----------------------------------------
Checking coverage for:
  controllers >= 90.00%
  models >= 90.00%
----------------------------------------
  all files: 98.31%% coverage
  controllers: 100.00%% coverage
  models: 100.00%% coverage
  mailers: 100.00%% coverage
  helpers: 75.00%% coverage
  libraries: 100.00%% coverage

Passed coverage test.
  Score: 20.0/20.0
----------------------------------------

----------------------------------------
Running reference Cucumber scenarios:
Disabling profiles...
Feature: search for movies by director
  
  As a movie buff
  So that I can find movies with my favorite director
  I want to include and serach on director information in movies I enter

  Background: movies in database      # /home/ubuntu/rag/submissions/dfaba4421e72798c347dbec8233e880c/assignment4/2018-10-26-11-14-47/required_features/director.feature:7
    Given the following movies exist: # features/step_definitions/movie_steps.rb:2
      | title        | rating | director     | release_date |
      | Star Wars    | PG     | George Lucas | 1977-05-25   |
      | Blade Runner | PG     | Ridley Scott | 1982-06-25   |
      | Alien        | R      |              | 1979-05-25   |
      | THX-1138     | R      | George Lucas | 1971-03-11   |

  Scenario: add director to existing movie                # /home/ubuntu/rag/submissions/dfaba4421e72798c347dbec8233e880c/assignment4/2018-10-26-11-14-47/required_features/director.feature:16
    When I go to the edit page for "Alien"                # features/step_definitions/web_steps.rb:48
    And I fill in "Director" with "Ridley Scott"          # features/step_definitions/web_steps.rb:69
    And I press "Update Movie Info"                       # features/step_definitions/web_steps.rb:61
    Then the director of "Alien" should be "Ridley Scott" # features/step_definitions/movie_steps.rb:16

  Scenario: find movie with same director                       # /home/ubuntu/rag/submissions/dfaba4421e72798c347dbec8233e880c/assignment4/2018-10-26-11-14-47/required_features/director.feature:22
    Given I am on the details page for "Star Wars"              # features/step_definitions/web_steps.rb:44
    When I follow "Find Movies With Same Director"              # features/step_definitions/web_steps.rb:65
    Then I should be on the Similar Movies page for "Star Wars" # features/step_definitions/web_steps.rb:239
    And I should see "THX-1138"                                 # features/step_definitions/web_steps.rb:114
    But I should not see "Blade Runner"                         # features/step_definitions/web_steps.rb:132

  Scenario: can't find similar movies if we don't know director (sad path)   # /home/ubuntu/rag/submissions/dfaba4421e72798c347dbec8233e880c/assignment4/2018-10-26-11-14-47/required_features/director.feature:29
    Given I am on the details page for "Alien"                               # features/step_definitions/web_steps.rb:44
    Then I should not see "Ridley Scott"                                     # features/step_definitions/web_steps.rb:132
    When I follow "Find Movies With Same Director"                           # features/step_definitions/web_steps.rb:65
    Then I should either be on the home page or the RottenPotatoes home page # features/step_definitions/saas_web_steps.rb:1
    And I should see "'Alien' has no director info"                          # features/step_definitions/web_steps.rb:114

3 scenarios (3 passed)
17 steps (17 passed)
0m0.403s

 *** ERROR: # *** 
Coverage report generated for Cucumber Features, RSpec to /home/ubuntu/rag/submissions/dfaba4421e72798c347dbec8233e880c/assignment4/2018-10-26-11-14-47/coverage. 45 / 59 LOC (76.27%) covered.
Test passed. (+0.5)
  3 out of 3 scenarios passed
  Score: 40/40
----------------------------------------
Total score: 80.0 / 100.0
Completed in 17.039874287 seconds.

@tansaku
Copy link
Contributor

tansaku commented Oct 29, 2018

just a guess @Russell108 - is it possible that your cucumber setup is not configured properly for coverage?

I'm just looking at the following output:

Running student tests found in features/ spec/:
Using the default profile...
0 scenarios
0 steps
0m0.000s
Coverage report generated for Cucumber Features to /home/ubuntu/rag/submissions/dfaba4421e72798c347dbec8233e880c/assignment4/2018-10-26-11-14-47/coverage. 0.0 / 0.0 LOC (100.0%) covered.

  Cucumber: 0 out of 0 scenarios passed
  RSpec: 18 out of 18 tests passed
  Score: 20/40

seems like the zero cucumber scenarios running as part of the coverage report might be the problem? although conceivably it's the rspec coverage configuration - do you get a coverage report running locally?

@Russell108
Copy link
Author

Russell108 commented Oct 29, 2018 via email

@tansaku
Copy link
Contributor

tansaku commented Oct 30, 2018

hi @Russell108 - yes, I see you have the cukes - what I mean is that the cukes may not be "hooked up" to the coverage via the env.rb file. See the instructions in part 2 where it says:

Next, add the following code BEFORE ANYTHING ELSE ON LINE ONE of spec/rails_helper.rb and features/support/env.rb:

require 'simplecov'
SimpleCov.start 'rails'

I was wondering if that might be the problem.

The graders a flaky - we do have an upgrade for this whole assignment that should make it less flaky but haven't had time to deploy yet.

I've been working with the graders for five years, and I am not sure what the default profile is - I could come up with a guess by diving into them, but as you say, probably not worth it.

I wouldn't bother starting from scratch, just making sure you can get simple cov results locally for both cukes and rspec.

@Russell108
Copy link
Author

Russell108 commented Oct 30, 2018 via email

@tansaku
Copy link
Contributor

tansaku commented Oct 30, 2018

@Russell108 I think you are missing things from ^^^ you can edit the comment

@Russell108
Copy link
Author

Russell108 commented Oct 30, 2018 via email

@tansaku
Copy link
Contributor

tansaku commented Oct 30, 2018

@Russell108 look at your comment from before.

this is what it looks like to me:

it looks like you were trying to paste in some terminal output, but failed to do so - please edit the comment to include the output you wanted

@kantuni
Copy link

kantuni commented Dec 1, 2018

I had the exact same problem. I solved it by deleting the --tags 'not @wip' from std_opts in cucumber.yml. That was a bit of a mouthful 😆.

P.S. You see where it says default: <%= std_opts %> features, that's the default profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants