19
Test automation in Loris

Test automation in Loris

Embed Size (px)

Citation preview

Page 1: Test automation in Loris

Test automation in Loris

Page 2: Test automation in Loris

What have we done with automation test in Loris?

How do we do automation test in Loris?

Why do we need automation test in Loris?

What is the future of automation test in Loris?

Page 3: Test automation in Loris

Running test script in Travis_CI purpose:

Make sure that pull request after merged could work well with other modules.

Regression test and Integration test.

----Time saving and labor saving.

Page 4: Test automation in Loris

How does test automation work in testFiles location:

/modules/module_name/test/TestPlan

/modules/module_name/test/module_name_test.php

Page 5: Test automation in Loris

Inserting the test data - conflict_resolver

Page 6: Test automation in Loris
Page 7: Test automation in Loris

Permission test

Page 8: Test automation in Loris

Automation Test ScriptDemo Checking functional UI

Text box, drop box

Searching

Inputting

Sorting

Buttons and links…

Page 9: Test automation in Loris

Checking UI [ button, Label, link ]

Variable55

Link Site:all

Labe

l

Data entry conflicts

Page 10: Test automation in Loris

function testClearFormUnresolvedConflicts() { $this->safeGet($this->url . "/conflict_resolver/"); $keywordElement = $this->webDriver->findElement( WebDriverBy::Name("Question") // ID ClassName Xpath LinkByText ); $keywordElement->sendkeys('TestTestTest'); //click clear form button $this->webDriver->findElement(WebDriverBy::ID("testClearForm1"))->click(); $bodyText =$this->webDriver->findElement( WebDriverBy::Name("Question") )->getText(); $this->assertNotContains("TestTestTest", $bodyText); }

Test a clear button for a form in Loris.

Page 12: Test automation in Loris

The Future of automation test in Loris

creating more different test scenariosEX: Function createOneUser(){ …. }

Function changePassword(){ .... }

Function setConfigration(){ .... }

Page 13: Test automation in Loris

Creating more test cases for validation testError guessing :

Ex. input non_num character into a datetime box.

Boundary checking:

Ex. input more characters than the text field needs.

Page 14: Test automation in Loris

Travis_ci doesn’t like react.React component can’t be tested by travis_ci. It can be tested in VM.

Page 15: Test automation in Loris

How to test React filter table in Travis_CI?

format=json

Page 16: Test automation in Loris

Find one piece of datanull data

Page 17: Test automation in Loris

After add new features, enhance the automated test script.

<sandbox> 0 <sandbox>

1 or 0

1: Creating the testing script for VM. Function createOneUser(){ …. }

Function changePassword(){ .... }

Testing React componant

0: Creating the testing script for Travis_CI.

Page 18: Test automation in Loris

Why Travis make our pull request failed?demo 1 : <a href=” …. ” id = “old” name = ”old” class = ”old”> </a> <a href=” …. ” id = “new” name = ”new” class = ”new”> </a>

demo 2 : add a new column or remove a column.

demo 3 : html elements to react elements.

Temporary solution: $this->markTestSkipped( ‘Skipping this test’ );

Page 19: Test automation in Loris

Thank you!