Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 554 Bytes

File metadata and controls

24 lines (18 loc) · 554 Bytes

You want to test if report returns expected results

by Tomas Svarovsky

Problem

You want to be sure that reports return expected results. This is a basis for delving later into test driven BI projects.

Solution

# encoding: utf-8

require 'gooddata'

GoodData.with_connection('user', 'password') do |client|
  GoodData.with_project('project_pid') do |project|
    report = project.report(32)
    result = report.execute
    fail "Report has unexpected result" unless result == [[1, 2, 3]]
  end
end

Discussion