Skip to content

Commit

Permalink
Merge pull request #297 from bugsnag/event-metadata-scenario
Browse files Browse the repository at this point in the history
test: add event metadata flag to mazerunner
  • Loading branch information
fractalwrench authored Apr 24, 2018
2 parents 66b391d + 34b7685 commit 82978d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ class MainActivity : Activity() {

private fun executeTestCase() {
val eventType = intent.getStringExtra("EVENT_TYPE")
val eventMetaData = intent.getStringExtra("EVENT_METADATA")
Log.d("Bugsnag", "Received test case, executing " + eventType)
val testCase = factory.testCaseForName(eventType, prepareConfig(), this)
testCase.eventMetaData = eventMetaData
testCase.run()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import com.bugsnag.android.NetworkException
abstract internal class Scenario(protected val config: Configuration,
protected val context: Context) {

var eventMetaData: String? = null

open fun run() {
Bugsnag.init(context, config)
Bugsnag.setLoggingEnabled(true)
Expand Down

0 comments on commit 82978d0

Please sign in to comment.