Quantcast
Channel: SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 789

SAPUI5 project setup for beginners with HTML views - Part4: Testing your application

$
0
0

Hi,

 

This blog is the third part of the blog series "SAPUI5 project setup for beginners with HTML views". All different parts:

Part1: Installation

Part2: Navigation and storing data with a global model - full project https://github.com/lemaiwo/SAPUI5-part1

Part3: Navigation and storing data with different models - full project https://github.com/lemaiwo/SAPUI5-part2

Part4: Testing your application

 

Part4: Testing your application

In the previous parts of this blog I’ve created a sapui5 application. How to test this?

 

There are two options:

  • Configure chrome
  • Local webserver

Last but not least there is something about caching.

 

Configure Chrome

The first option is to just browse to your project by using your internet explorer or chrome or …

You copy the path of your project from eclipse:

pic1.png

 

Copy the location from the properties

 

pic2.png

 

Paste it in your browser

 

Select WebContent

 

pic3.png

Select index.html

 

pic4.png

 

But this could give errors:

 

pic5.png

 

You can solve this by creating a shortcut of google chrome and add the following to the target property

--args --allow-file-access-from-files

 

pic6.png

But this did not always worked for me…

 

 

Local webserver

So another option which I mostly use is a local webserver, XAMPP: http://www.apachefriends.org/en/xampp.html

Open XAMPP Control Panel and start Apache

 

pic7.png

Then copy the project from the workspace to the XAMPP server. The link to the workspace is in the properties of the project. Copy the project and past it in C:\xampp\htdocs.

 

Now  the application is able to run from the localhost:

localhost/FirstSAPUI5Project/WebContent/

 

pic8.png

 

Caching

If you do some changes to your application, it is possible that some parts are still cached. A good way to get rid of this caching is opening your development tools in chrome by pressing F12.

 

In the development tools, go to settings:

 

pic9.png

 

Disable cache while DevTools is open:

 

pic10.png

 

When Dev tools is open and you refresh the application nothing will be cached. From time to time it could be required to clear cache manually. Press CTRL + SHIFT + DEL:

 

 

pic11.png

 

So you are sure that the whole cache is cleared.

 

Kind regards,

Wouter


Viewing all articles
Browse latest Browse all 789

Trending Articles