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 test
Files location:
/modules/module_name/test/TestPlan
/modules/module_name/test/module_name_test.php
Inserting the test data - conflict_resolver
Permission test
Automation Test Script
Demo Checking functional UI
Text box, drop box
Searching
Inputting
Sorting
Buttons and links…
Checking UI [ button, Label, link ]
Variable55
Link Site:all
Label
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 scenarios
EX: Function createOneUser(){ …. }
Function changePassword(){ .... }
Function setConfigration(){ .... }
Creating more test cases for validation test
Error 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 data
null 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!

Test automation in Loris

  • 1.
  • 2.
    What have wedone 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?
  • 3.
    Running test scriptin 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.
  • 4.
    How does testautomation work in test Files location: /modules/module_name/test/TestPlan /modules/module_name/test/module_name_test.php
  • 5.
    Inserting the testdata - conflict_resolver
  • 7.
  • 8.
    Automation Test Script DemoChecking functional UI Text box, drop box Searching Inputting Sorting Buttons and links…
  • 9.
    Checking UI [button, Label, link ] Variable55 Link Site:all Label Data entry conflicts
  • 10.
    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.
  • 12.
    The Future ofautomation test in Loris creating more different test scenarios EX: Function createOneUser(){ …. } Function changePassword(){ .... } Function setConfigration(){ .... }
  • 13.
    Creating more testcases for validation test Error guessing : Ex. input non_num character into a datetime box. Boundary checking: Ex. input more characters than the text field needs.
  • 14.
    Travis_ci doesn’t likereact. React component can’t be tested by travis_ci. It can be tested in VM.
  • 15.
    How to testReact filter table in Travis_CI? format=json
  • 16.
    Find one pieceof data null data
  • 17.
    After add newfeatures, 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.
  • 18.
    Why Travis makeour 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’ );
  • 19.