Tests Writing Hackday!

Tests Writing Hackday!

@members Hey guys, we need a kickstart on test writing for our plugins. I think we need a hackday!

We can live code together (whereby.com open in one window), to make some real progress over 24 hours.

How does that sound?

Thoughts welcome on:

  • the date. I’m proposing Nov 30, but open to suggestions
  • the format
  • the plugins

On the plugins I suggest we focus on:

  • @merefield: TLP
  • @fzngagan: Events
  • @pacharanero: QnA (I’ll give you more background beforehand)
  • @angus: Custom Wizard
  • @Eli: focus on our Travis setup running scheduled tests, both CI with GitHub and a regular schedule (I.e every 24 hours). Also consider how we can integrate this into managed updates.


Love the idea (and I might want to work on the new platform post forthcoming), but I won’t be able to do the 30th. Will come back with a better date after I’ve moved since I’m unsure what plans my family might have set for me without telling me yet.


I agree it’s an excellent idea. 30th is a Saturday, which means I have various family commitments especially in the morning but I could probably put in 6 hours from about 1300-1900 on an average Saturday.

However, since @Eli can’t make the 30th lets see what the alternative dates look like. In general I’d prefer a weekday for this, because as we get into December I am gigging with the band a bit more and Saturdays will start to get pretty full.


@Eli @pacharanero How about the 28th or 29th next week?

The entirety of next week is a no go for me unfortunately, will have to wait until December.
Sorry for the inflexibility.

@members How about 2019-12-04T13:00:00Z?


@members Ok, I’m proposing 2019-12-04T13:00:00Z. Please RSVP in the event controls on this topic if you can make it!

In the lead up to the day, we can discuss the basics of how to write tests and the CI setup we want. I’ll add some thoughts here later today.

1 Like

3 posts were split to a new topic: Writing Tests for Plugins

@merefield @pacharanero @Eli Hey guys, does the 5th work for you?


I’m available Dec 5th from 2019-12-05T07:00:00Z2019-12-05T09:00:00Z and 2019-12-05T10:30:00Z2019-12-05T17:00:00Z

1 Like

A little confused about format of event, member involvement approach and attendance arrangements? Do we dial in when we can?

Second session maybe best for UK people though I’ll try to get up and dial in at my 6am. :open_mouth:

1 Like

I will join in as per my above times

I’ll be joining from 2019-12-05T06:30:00Z

Cool, I’m going to push bach my first session to have more overlap with @pacharanero and @fzngagan. I’m now

2019-12-05T04:00:00Z2019-12-05T09:00:00Z then continuing 2019-12-05T22:00:00Z2019-12-06T01:00:00Z

@merefield you can join in whenever suits; 6am sounds a bit early! Don’t sweat if there’s no overlap, but let me know what times work best for you and I’ll tweak my sessions to suit.

@Eli I’ll also give you some guide on what to look at travis-wise.

I’ll be posting what I’ve learnt along the way here.


@pacharanero For the Question Answer plugin.

Firstly, I think it’ll help to address the structural issues in this plugin. This is basically just moving code around, but it’ll help to make it clearer where everything is and how it works together.

  1. The different classes in the 4 files in /lib need to be filed away in the standard rails app structure, with edits to discourse classes going in the plugin.rb using the server-side plugin api (i.e. the methods in discourse/lib/plugin/instance.rb)

  2. The qa_can_vote topic and post methods should be in a guardian.

Then for the tests themselves, I’ve just created a new branch ‘add_tests’ with all the rspec and qunit tests I think are most important in this plugin.

Go through the files one by one, focusing on each class, component or widget at a time. By understanding how each works in turn, it’ll give you a clearer understanding of the whole.

1 Like

@merefield @fzngagan Let me know if you want help with structuring / planning out your rspec and qunit tests.

1 Like

Ok guys, I’m live at Video Meetings, Video Conferencing, and Screen Sharing - Whereby (formerly appear.in) (which has a snazzy new look!) writing tests for the custom wizard plugin.

Aya I confused dates and thought this was tomorrow >.<

No worries!

@members I’m going to be online writing tests again at (new time) 2019-12-06T04:00:00Z2019-12-06T09:00:00Z

@Eli We can talk about travis and CI in our call tomorrow


I will see if I can get up super early (I’m up anyway for training anyway at 0615GMT) and join you, as I think I’m going to need a bit of ‘getting-started’ help just so I’m on the right track