Skip to content

add acceptance tests for event tracking - #1207

Merged
mulby merged 1 commit into
openedx:masterfrom
mulby:gabe/tracking-tests
Oct 9, 2013
Merged

add acceptance tests for event tracking#1207
mulby merged 1 commit into
openedx:masterfrom
mulby:gabe/tracking-tests

Conversation

@mulby

@mulby mulby commented Oct 2, 2013

Copy link
Copy Markdown
Contributor

I'm not sure if this is an appropriate direction, might be too nuts-and-bolts for an acceptance test. However, if you think of our researchers as users (of the data, not the site), then I think it makes more sense.

I'm not thrilled with the usage mongo here, I toyed around with creating an "in memory backend" that would just store the events in a list or something, but figured it was better to get coverage of the entire pipeline.

Reviewers: @rocha, @wedaly

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should include an error message with this assertion containing which expected field wasn't found. Nose assertions allow a msg kwarg; assert_in might be a good one here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't know nose exposed all of the TestCase methods for me, that's awesome! Fixed.

@wedaly

wedaly commented Oct 3, 2013

Copy link
Copy Markdown
Contributor

I'm really happy to see an LMS/Analytics integration test, and I agree with this approach.

I think the build failure might have been a casualty of GitHub going down this afternoon, so you should re-trigger the job manually.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we tested against the http.request event instead? I am amusing the in the last line means event_type.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm putting this patch in before the other one, so it is simply verifying the current event format, where event_type = url for page view events.

Once I integrate with edx platform I'd like to continue to verify the old events, but also include so kind of verification for new events as well.

@mulby

mulby commented Oct 7, 2013

Copy link
Copy Markdown
Contributor Author

The video.feature test fails on Jenkins but not on my local environment... I suspect some kind of race condition. I'm currently trying to figure out the best way to debug the issue.

@wedaly - do we have direct ssh access to the jenkins slave? Also, is there some place I can "see" the configuration of the Jenkins job? I want to make sure I'm running the same command locally as Jenkins is running...

@wedaly

wedaly commented Oct 7, 2013

Copy link
Copy Markdown
Contributor

@mulby I think there's a non-deterministic test in video.feature -- when I ran master a bunch of times this weekend, it failed intermittently. I'm working on getting that fixed now. That's one of the benefits of running the tests more frequently; there's an incentive to get things fixed :)

We can directly ssh into the jenkins slave, but it involves some setup to get into the VPC.

The Jenkins job delegates to the rake tasks to run the tests:

rake test:acceptance:cms["-v 3 --tag shard_${SHARD}"]

where $SHARD is either 1, 2, or 3.

One of my goals for the hackathon is to set up vagrant to exactly duplicate the Jenkins worker configuration, which should make it easier to track and fix these kinds of failures.

@mulby

mulby commented Oct 7, 2013

Copy link
Copy Markdown
Contributor Author

@wedaly - I removed the video.feature test and replaced it with a couple of problem related event tests. Hopefully that's fine for now. Pretty soon we are going to start "touching" most of the emitted events, so I'm planning on adding coverage for each event as we go.

@rocha, @wedaly - after squashing is this good to merge (assuming tests pass)?

@mulby

mulby commented Oct 7, 2013

Copy link
Copy Markdown
Contributor Author

@rocha - are we supposed to be tracking events in the CMS?

@wedaly

wedaly commented Oct 7, 2013

Copy link
Copy Markdown
Contributor

👍

@rocha

rocha commented Oct 7, 2013

Copy link
Copy Markdown
Contributor

LGTM

@mulby yes, we are capturing some events on the CMS, mostly on the server side. I feel it is not comprehensive.

Also, looks like you need to rebase 😕

@mulby

mulby commented Oct 7, 2013

Copy link
Copy Markdown
Contributor Author

@rocha - yeah I'm going to rebase and squash before merging this. I'm going to defer adding acceptance tests to the CMS for now. I'm not really clear on how that data is going to be used.

mulby added a commit that referenced this pull request Oct 9, 2013
add acceptance tests for event tracking
@mulby
mulby merged commit 5359e2e into openedx:master Oct 9, 2013
@mulby
mulby deleted the gabe/tracking-tests branch October 9, 2013 14:08
jenkins-ks pushed a commit to nttks/edx-platform that referenced this pull request Sep 23, 2016
…ew_problem_for_dogwood_release

Fix few problem for dogwood release openedx#1167
iloveagent57 pushed a commit that referenced this pull request Feb 26, 2024
By using the correct health check (TCP, rather than UNIX socket) we can get
rid of the 10 second sleep.

See docker-library/mysql#930 for discussion of
health checks.

This commit also simplifies the wait-for-mysql code in the provisioning script.
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

Successfully merging this pull request may close these issues.

3 participants