Upload
wasion-wang
View
16
Download
0
Embed Size (px)
Citation preview
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?
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.
How does test automation work in testFiles location:
/modules/module_name/test/TestPlan
/modules/module_name/test/module_name_test.php
Inserting the test data - conflict_resolver
Permission test
Automation Test ScriptDemo Checking functional UI
Text box, drop box
Searching
Inputting
Sorting
Buttons and links…
Checking UI [ button, Label, link ]
Variable55
Link Site:all
Labe
l
Data entry conflicts
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.
The Future of automation test in Loris
creating more different test scenariosEX: Function createOneUser(){ …. }
Function changePassword(){ .... }
Function setConfigration(){ .... }
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.
Travis_ci doesn’t like react.React component can’t be tested by travis_ci. It can be tested in VM.
How to test React filter table in Travis_CI?
format=json
Find one piece of datanull data
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.
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’ );
Thank you!