Context NNG ships navigation solutions on a broad UNIVERSITAS - - PowerPoint PPT Presentation

context
SMART_READER_LITE
LIVE PREVIEW

Context NNG ships navigation solutions on a broad UNIVERSITAS - - PowerPoint PPT Presentation

UNIVERSITAS SCIENTIARUM SZEGEDIENSIS UNIVERSITY OF SZEGED D epartment of Software Engineering Supporting Software Product Line Testing by Optimizing Code Configuration Coverage Lszl Vidcs 1 , Ferenc Horvth 2 , Jzsef Mihalicza 3 , Bla


slide-1
SLIDE 1

UNIVERSITAS SCIENTIARUM SZEGEDIENSIS UNIVERSITY OF SZEGED

Department of Software Engineering

Supporting Software Product Line Testing by Optimizing Code Configuration Coverage

1MTA-SZTE Research Group

  • n Artificial Intelligence, Hungary

2Department of Software Engineering,

University of Szeged, Hungary

TAIC PART | Testing: Academic & Industrial Conference - Practice and Research Techniques | Graz, Austria, 2015

3NNG LLC,

Budapest, Hungary

László Vidács1, Ferenc Horváth2, József Mihalicza3, Béla Vancsics2 and Árpád Beszédes2

slide-2
SLIDE 2

UNIVERSITY OF SZEGED

Department of Software Engineering

UNIVERSITAS SCIENTIARUM SZEGEDIENSIS

Context

NNG ships navigation solutions on a broad spectrum: Automotive line fit solutions for tier 1 clients Over 30 car brands carry iGO navigation

(Qnx, Android, Linux, WinCE)

White label core product After-market head units, mobile apps

(iOS, WinCE, WinMobile, Android)

Mobile navigation app for B2C end users

TAIC PART 2015 2

slide-3
SLIDE 3

UNIVERSITY OF SZEGED

Department of Software Engineering

UNIVERSITAS SCIENTIARUM SZEGEDIENSIS

Product Line

NNG philosophy: „Navigation for All” Achieved by a single code base for core functionalities Customizations should integrate well with core features SPL: code variability at preprocessor level

■ Platforms (and variants), compilers, rendering engines, 32bit/64bit ■ Windows CE/Mobile/PC, QNX, Linux, Android, iOS ■ Features, customizations

TAIC PART 2015 3

slide-4
SLIDE 4

UNIVERSITY OF SZEGED

Department of Software Engineering

UNIVERSITAS SCIENTIARUM SZEGEDIENSIS

Research goal

Testing release configurations is not sufficient

■ Get a feature from Config A and turn it on in Config B

Efficient testing of the configurable core code Research goal: Select small number of configurations which cover large amount of code

TAIC PART 2015 4

slide-5
SLIDE 5

UNIVERSITY OF SZEGED

Department of Software Engineering

UNIVERSITAS SCIENTIARUM SZEGEDIENSIS

Variable Block Configuration

#define PLATFORM_WIN32 #define A 2 #define B 10

Coverage

Source code lines with enabled presence conditions

Presence condition

TAIC PART 2015 5

Preprocessor based Variability

1 #if A == 1 2 #define B 2 3 #endif 4 5 #if A == 2 6 #define B 6 7 #endif 8 9 #if !defined(B) 10 byte x; 11 #elif B >= 4 12 int x; 13 #endif

slide-6
SLIDE 6

UNIVERSITY OF SZEGED

Department of Software Engineering

UNIVERSITAS SCIENTIARUM SZEGEDIENSIS

Search algorithms

Find N(<10) configurations with highest possible coverage Approach

■ Build each configuration incrementally (greedy approach) ■ Create new configurations until N is reached

Block-based approach

■ Try to cover the largest uncovered block

Variable-based approach

■ Select the variable which results the highest overall coverage increase

TAIC PART 2015 6

slide-7
SLIDE 7

UNIVERSITY OF SZEGED

Department of Software Engineering

UNIVERSITAS SCIENTIARUM SZEGEDIENSIS

#if X > 0 && Y ==5

Block-based algorithm

B1 B2 B3 B4 B5 B7 B6 B8 #define A 100 #define B -43

TAIC PART 2015 7

#define X 1 #define Y 5

Examine largest uncovered block 1 Satisfy presence condition 2 Refresh the global coverage 4

Extend candidate configuration

3

slide-8
SLIDE 8

UNIVERSITY OF SZEGED

Department of Software Engineering

UNIVERSITAS SCIENTIARUM SZEGEDIENSIS

Variable-based algorithm

A B X

… …

undefined [-∞; 0] [1; ∞] B1 B2 B3 B4 B5 B6 BN

35 60 121

TAIC PART 2015 8

#define A 100 #define B -43 #define X 1

For each free configuration variable

1

Compute coverage for each value interval

2

Extend candidate configuration & refresh the global coverage

3 + + + + +

slide-9
SLIDE 9

UNIVERSITY OF SZEGED

Department of Software Engineering

UNIVERSITAS SCIENTIARUM SZEGEDIENSIS

iGO Navigation Measurements

Condition type Blocks LOC Filtered (T, F, #error) 11,847 (25%) 682,300 (35%) Configuration 22,067 (47%) 920,926 (48%) Mixed 10,085 (22%) 271,710 (14%) Non-configuration 2,811 (6%) 50,064 (3%) Total 46,810 1,925,000

 #error directives

■ Prevent invalid configurations

 Non-configuration variables -> mixed conditions

■ MODULE1_DETAILED_DIAG, PERSONAL_PATCHES_JOE

TAIC PART 2015 9

slide-10
SLIDE 10

UNIVERSITY OF SZEGED

Department of Software Engineering

UNIVERSITAS SCIENTIARUM SZEGEDIENSIS

Results: block-based, N = 10

100 200 300 400 500 600 700 800 900 1000 1 2 3 4 5 6 7 8 9 10 Coverage (kLOC) Configurations Config coverage Delta coverage Config LOC

TAIC PART 2015 10

Config coverage 98.74% Search time 22 min

slide-11
SLIDE 11

UNIVERSITY OF SZEGED

Department of Software Engineering

UNIVERSITAS SCIENTIARUM SZEGEDIENSIS

Results: variable-based, N = 10

100 200 300 400 500 600 700 800 900 1000 1 2 3 4 5 6 7 8 9 10 Coverage (kLOC) Configurations Config coverage Delta coverage Config LOC

TAIC PART 2015 11

Config coverage 75.56% Search time 27 min

slide-12
SLIDE 12

UNIVERSITY OF SZEGED

Department of Software Engineering

UNIVERSITAS SCIENTIARUM SZEGEDIENSIS

Results: block-based, N = 50

100 200 300 400 500 600 700 800 900 1000 1 10 20 30 40 50 Coverage (kLOC) Configurations Config coverage Delta coverage Config LOC

TAIC PART 2015 12

Config coverage 99.74% Search time 2 h

slide-13
SLIDE 13

UNIVERSITY OF SZEGED

Department of Software Engineering

UNIVERSITAS SCIENTIARUM SZEGEDIENSIS

TAIC PART 2015 13

VARIABLE-BASED

75.56%

N=10, 27 min

BLOCK-BASED

98.74%

N=10, 22 min

Multiple variables at a time Hybrid algorithm Enhanced #error directives

Results & plans