Testing Flashcards

1
Q

How to start a test class?

A

@isTest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to make a test visible?

A

@TestVisible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

System.RunAs()

A

Check if specific users have access to data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

System.assert()

A

Checks if data matches for the test and results

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Try/Catch vs Finally

A

Try catch makes an effort to execute the code

Finally will run no matter what

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Types of exception handling

A

System

Custom

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Positive Test

A

Tests to ensure that the application is working properly. If an application breaks during a positive test, the test fails

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Negative test

A

Tests whether or not an application will fail given an input and is meant to handle the exception error.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Code Coverage required

A

75% code coverage minimum for AppExchange and Projects
Used to be 100%
Doesn’t include system debug lines

How well did you know this?
1
Not at all
2
3
4
5
Perfectly