Please enable JavaScript.
Coggle requires JavaScript to display documents.
9. Fiori Testing (Integration Testing (OPA5 (OPA5 Configurations (sap.ui…
9. Fiori Testing
Unit Testing
-
-
QUnit
-
-
-
-
-
Assertions
Assert.equal(result, expected, Message)
Assert.ok(true_or_false_logic, "Message")
-
0, null, NaN, empty string, and undefined = FAILED
*
Stubs
return objects that the actual execution of a function would
return but without executing the actual code
Mocks
-
Expectations
-
-
what exact values of arguments are to be passed, etc.
Sinon.JS
-
simplify the process of creating mocks, stubs, and spies
-
creating Stubs
-
-
oController.calculateCost
= sinon.stub().withArgs([‘3323234’, 2]).returns(330);
-
-
Creating a Unit Test
-
Lesson Learn
-
QUnit APIs
-
QUnit.test
-
QUnit.test("shown string", assert_function(assert))
assert.strictEqual(testResult, "expectedResult", "String when test passed")
-
-
-
-
Integration Testing
OPA5
Components of OPA5
-
-
-
OPA Journey
-
-
-
opaTest.qunit.html
-
includes all pages, journeys and
OPA5 tests
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Test Functions
waitFor
-
Upon rendering, it will trigger a press button
-
-
-