wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Automation Testing Exam

Total questions: 45

Worksheet time: 35mins

Name
Class
Date
1.

What are difference between REST and RESTful?

a)

A. REST represents REpresentational State Transfer; it is a relatively new aspect of writing web API. RESTful is referred for web services written by applying REST architectural concept are called

b)

B. In REST HTTP methods like GET, POST, PUT and DELETE can be used to perform CRUD operations

c)

C. A is true B is false

d)

D. Both A & B are true

2.

What are the HTTP methods supported by REST?

a)

A. REA INSERT, UPDATE DELETE

b)

B. FETCH, CREATE CHANG REMOVE

c)

C. GET, POST, PUT, DELETE

d)

D. RETRIEV CREAT REPLACE TERMINATE

3.

Which of these statements about HTTP GET is true?

a)

A. With HTTP GET, what we are doing is fetching something from the server

b)

B. By dropping any URL into your web browser, your browser will automatically send an HTTP GET to whatever URL you are

looking for

c)

C. A is true, B is false

d)

D. Both A & B are true

4.

Which of these statements about HTTP POST is true?

a)

A. With HTTP POST, what we are doing is sending some data to the server via POST

b)

B. By dropping any URL into your web browser, your browser will automatically send an HTTP POST to whatever URL you are looking for

c)

C. A is true, B is false

d)

D. Both A & B are true

5.

Which of these statements about HTTP PUT is true?

a)

A. In HTTP PUT, if you PUT an object twice, it has no additional effect

b)

B. With HTTP PUT, what we are doing is updating some data of the server via PUT

c)

C. HTTP PUT also use for creating

d)

D. All of the above

6.

Which of these statements about HTTP DELETE is true?

a)

A. In HTTP DELETE, if you DELETE an object twice, it will change state of data twice

b)

B. With HTTP DELETE, what we are doing is sending an HTTP DELETE request along with the ID of the permit we would like to delete

c)

C. A is true, B is false

d)

D. A is false, B is true

7.

What are integration tests?

a)

A. Integration tests are any kind of test that combines more than one thing together

b)

B. Integration tests are small, method-level tests developers write to prove to them

c)

C. Integration tests are scripts that test your application in the same way an end user would

d)

D. All of the above

8.

Why are intergration tests important?

a)

A. They play a critical role in helping us catch low-level bugs we miss at the lower unit-test level

b)

B. Integration tests strike a balance between armor (UI tests) and mobility (unit tests)

c)

C. They let us test systems at the same level they are built on

d)

D. All of the above

9.

What are difference between Unit and Integration Testing?

a)

A. In unit testing each module of the software is tested separately. In integration testing all modules of the the software are tested combine

b)

B. In unit testing tester doesn’t know the internal design of the software In integration testing tester knows the internal design of the software

c)

C. Unit testing is a black box testing. Integration testing is a white box testing.

d)

D. Both B & C are true

10.

What are difference between UI and Integration Testing?

a)

A. UI Testing is testing the UI specifically. Integration Testing is to evaluate how different components work together.

b)

B. UI tests are also integration tests.

c)

C. Both A & B are true

d)

D. A is true B is false

11.

Given the code snippet:


def setup

@user = users(:user1)

end

test "login with valid credentials" do

get login_path

post login_path, session: { email: 'user@test.com', password: 'password' }

follow_redirect!

assert_select "h1", "Welcome"

end

a)

A. The function test is unit test

b)

B. The function test is integration test

c)

C. The function test is UI test

d)

D. None of the above

12.

Given the code snippet:


def setup

@length = 3.0

@width = 4.0

end

def test_area

assert_equal(12, Rectanglarea(@length, @width))

end

def test_perimeter

assert_equal(14, Rectanglperimeter(@length, @width))

end

What level test is used in this code?

a)

A. The function test is unit test

b)

B. The function test is integration test

c)

C. The function test is UI test

d)

D. None of the above

13.

Testing in isolation nghĩa là gì?

a)

A. Testing in isolation có nghĩa là khi bạn viết test case, hãy cố gắng tập trung vào việc kiểm tra một thứ hoặc khái niệm tại một thời điểm.

b)

B. Testing in isolation có nghĩa là khi bạn viết test case, hãy cố gắng tập trung vào việc kiểm tra càng nhiều thứ hoặc khái niệm càng tốt tại một thời điểm.

c)

A đúng, B sai

d)

D. A sai, B đúng

14.

Quan điểm nào về test isolation sau đây là đúng?

a)

A. Một test isolation chỉ nên thực hiện một assertion cho mỗi test case

b)

B. Một test isolation có thể thực hiện nhiều assertion cho mỗi test case

c)

C. A và B đều đúng

d)

D. A và B đều sai

15.

Khi chúng ta thêm một nội dung test mới vào project, chúng ta nên:

a)

A. Thêm các test case vào cuối mỗi file đã có sẵn

b)

B. Tạo hẳn một file mới rồi thêm các test case vào đó

c)

C. A sai, B đúng

d)

D. Cả A, B đều đúng

16.

Những cách nào sau đây là những cách giúp cho việc tổ chức các test case trở nên "clean" hơn:

a)

A. Thêm các tính năng tương tự cần kiểm tra vào test case để tăng hiệu suất test

b)

B.Khi viết test case chỉ tập trung vào việc kiểm tra một thứ tại một thời điểm

c)

C. các test case liên quan nhau theo ngữ cảnh (context) để làm cho chúng dễ đọc và dễ bảo trì (support) hơn

d)

D. Cả B và C đều đúng

17.

Cho đoạn code sau đây:


class AreaAndPerimeterTest < MiniTest::Test

def setup

@length = 3.0

@width = 4.0

@base = 5.0

@height = 3.0

@abase = 6.0

@bbase = 7.0

@a = 1.0

@b = 2.0

@c = 3.0

@d = 4.0

end

def test_areas

assert_equal(12, Rectangle.area(@length, @width))

assert_equal(7.5, Triangle.area(@base, @height))

assert_equal(19.5, Trapezoid.area(@abase, @bbase, @height))

end

def test_perimeters

assert_equal(6, Rectangle.perimeter(@a, @b))

assert_equal(6, Triangle.perimeter(@a, @b, @c))

assert_equal(10, Trapezoid.perimeter(@a, @b, @c, @d))

end

end

Nhận xét nào dưới đây là đúng?

a)

A. Chúng ta không thể thấy rõ ngay được test nào đi với data nào

b)

B. Chúng ta có thể thấy rõ ngay được test nào đi với data nào

c)

C. Tên của class dài và khó hiểu

d)

D. A và C đúng, B sai

e)

E. A sai, B và C đúng

18.

Cho đoạn code sau đây:


class LoginPageTest < MiniTest::Test

def test_authentication_with_valid_credentials_should_have_signout_link

end

def test_authentication_with_invalid_credentials_should_not_have_error_message

end

def test_authentication_with_valid_credentials_should_have_correct_title

end

def test_authentication_with_invalid_credentials_should_have_signin_link

end

def test_authentication_with_invalid_credentials_should_have_error_message

end

end

Nhận xét nào sau đây là đúng:

a)

A. Các test case đều tốt không có vấn đề gì.

b)

B. Các test case giống nhau không được nhóm lại nên rất khó đọc. Nên phân loại valid_credentials và invalid_credentials.

c)

C.Ngữ cảnh của class LoginPageTest không rõ ràng. Nên thêm Authentication vào tên class.

d)

D. Cả A, B, C đều đúng

19.

Smoke test là gì?

a)

A. Smoke Test là một loại kiểm thử phần mềmđược thực hiện để xác định các chức năng hoạt động đúng như yêu cầu, thiết kế sau khi có một vài thay đổi nhỏ, hoặc sau khi fix 1 bug nào đó.

b)

B. Smoke Test là một loại kiểm thử phần mềm được thực hiện để đảm bảo rằng các chức năng quan trọng của phần mềm vẫn hoạt động bình thường.

c)

C. Smoke Test là một loại kiểm thử phần mềm trong đó các đơn vị hay thành phần riêng lẻ của phần mềm được kiểm thử. Kiểm thử đơn vị được thực hiện trong quá trình phát triển ứng dụng.

20.

UI Test được tạo ra từ end-to-end smoke test là tốt hơn Record/Playback test có đúng không?

a)

A. Đúng

b)

B. Sai

21.

Trên nền tảng WEB, CSS cung cấp chức năng nào hữu ích cho việc viết UI Test?

a)

A. Tạo các style cho nội dung của trang WEB.

b)

B. Chọn các phần tử của trang bởi CSS Selectors.

c)

C. Cả 2 đáp án trên.

22.

Smoke test được thực hiện bởi ai?

a)

A. Developer

b)

B. Tester

c)

C. Project Manager

d)

D. Cả A và B đúng

23.

Câu nào sau đây là Đúng khi nói về Smoke test?

a)

A. Đảm bảo các chức năng chính của ứng dụng triển khai chính xác.

b)

B. Không linh hoạt bằng Record/Playback test.

c)

C. Đảm bảo chương trình không có bug.

d)

D. Cả A và B đều đúng.

24.

Cách lấy phần tử trên WEB nào sau đây là dễ dàng nhất?

a)

A. Phần tử được lấy bằng ID.

b)

B. Phần tử được lấy bằng element, type, and attibute.

c)

C. Phần tử được lấy bởi position.

25.

What is Component Testing also called?

i. Unit Testing

ii. Program Testing

iii. Module Testing

iv. System Component Testing.

a)

A. i,ii,iii are true and iv is false

b)

B. i,ii,iii,iv are false

c)

C. i,ii,iv are true and iii is false

d)

D. all of above is true

26.

Which of the following are benefits and which are risks of using tools to support testing?

1. Over-reliance on the tool

2. Greater consistency and repeatability

3. Objective assessment

4. Unrealistic expectations

5. Underestimating the effort required to maintain the test assets generated by the tool

6. Ease of access to information about tests or testing

7. Repetitive work is reduced

a)

A. Benefits: 3, 4, 6 and 7. Risks: 1, 2 and 5

b)

B. Benefits: 1, 2, 3 and 7, Risks: 4, 5 and 6

c)

C. Benefits: 2, 3, 6 and 7. Risks: 1, 4 and 5

d)

D. Benefits: 2, 3, 5 and 6. Risks: 1, 4 and 7

27.

Assume postal rates for 'light letters' are:

$0.25 up to 10 grams;

$0.35 up to 50 grams;

$0.45 up to 75 grams;

$0.55 up to 100 grams.

Which test inputs (in grams) would be selected using boundary value analysis?

a)

A. 0, 9,19, 49, 50, 74, 75, 99,100

b)

B. 10, 50, 75,100, 250, 1000

c)

C. 0, 1,10,11, 50, 51, 75, 76,100,101

d)

D. 25, 26, 35, 36, 45, 46, 55, 56

28.

For the following piece of cod how many test cases are needed to get 100% statement coverage?


Procedure X

Read (Color) // Input color from user

IF (Color == “Red”) THEN

Call Roses(Color)

ELSEIF (Color == “Blue”) THEN

Call Violets(Color)

ELSE

PRINT “User is no Shakespeare”

SaveToDatabase(Color)

End Procedure X

a)

A. 5

b)

B. 3

c)

C.1

d)

D. 2

29.

What is integration testing?

a)

A. Integration of automated software test suites with the application under test.

b)

B. Testing performed to expose faults in the interaction between components and systems.

c)

C. Testing to verify that a component is ready for integration with the rest of the system.

d)

D. Testing to verify that the test environment can be integrated with the product.

30.

Để áp dụng mô hình kim tự tháp, chúng ta vận dụng theo trình tự nào?

a)

A. UI Test -> Unit Test -> Integration Test

b)

B. Unit Test -> Integration Test -> UI Test

c)

C. Integration Test -> UI Test -> Unit Test

d)

D. UI Test -> Integration Test

31.

Với một dự án mới đang trong giai đoạn phát triển, phát biểu nào sau đấy là sai?

a)

A. Thực hiện UI Test cho dự án ngay cả khi UI chưa ổn định

b)

B. Thực hiện viết Unit Test càng nhiều càng tốt khi triển khai code

c)

C. Triển khai automated lần lượt theo mô hình Pyramid

d)

D. Không quá tập trung vào UI Test mà tập trung vào UnitTest

32.

Việc một dự án áp dụng mô hình Inverted Pyramid có được coi là sai không?

a)

A. Sai, vì không tuân theo mô hình Pyramid

b)

B. Đúng vì có thể tùy vào hoàn cảnh dự án mà áp dụng Inverted Pyramid

33.

Cho 1 màn hình login. Sau khi nhập đúng tài khoản và mật khẩu thì sẽ chuyển sang màn hình LoginSuccess với message:”Login Success!”. Dev nên sử dụng cách nào sau đây để test cho trường hợp login success

a)

A. Lấy ID của màn hình success và khẳng định rằng nó đã hiển thị

b)

B. Lấy ID của màn hình success và check message “Login Success”

c)

C. Check message “Login Success”

d)

D. Tất cả đáp án trên đúng

34.

Cho 1 màn hình login. Sau khi nhập đúng tài khoản và mật khẩu thì sẽ chuyển sang màn hình LoginSuccess với message:”Login Success!”. Dev nên sử dụng cách nào sau đây để test cho trường hợp login success

a)

A. Lấy ID của màn hình success và khẳng định rằng nó đã hiển thị

b)

B. Lấy ID của màn hình success và check message “Login Success”

c)

C. Check message “Login Success”

d)

D. Tất cả đáp án trên đúng

35.

Câu lệnh Rspec sau mô tả cái gì?

a)

A. Signup with invalid credentials should have selector danger

b)

B. Signup should have selector danger with invalid credentials

c)

C. With invalid credentials signup should have selector danger

d)

D. With invalid credentials should have selector danger signup

36.

Các bước thực hiện để cải thiện code cho dễ đọc, dễ hiểu trong Programing 101?

a)

A. Naming -> RemovingDuplication -> Spacing

b)

B. Spacing -> Naming -> Removing Duplication

c)

C. Removing Duplication -> Spacing -> Naming

d)

D. Naming -> Spacing -> Removing Duplication

37.

Tầm quan trọng của Style trong lập trình là gi?

a)

A. Làm cho code dễ maintain.

b)

B. Làm cho code khó hiểu khi người khác đọc vào

c)

C. Làm cho code rõ ràng, việc maintain và hỗ trợ cũng dễ dàng hơn (chưa kể là chứa ít lỗi hơn).

d)

D. Làm cho code rõ ràng, dễ hiểu

38.
a)

A. Tạo variable

b)

B. Tạo class, variable

c)

C. Tạo class, variable, method

d)

D. Tạo class, method

39.

Chọn đáp án đúng với các lỗi ở chương trình sau:


test 'can access welcome page' do

@user=users(:user1)

get login_path

post login_path, session: { email: 'user@test.com', password: 'password' }

follow_redirect!

assert_select 'h1', Welcome'

end

test 'can access company financials' do

@user=users(:user1)

get login_path

post login_path, session: { email: 'user@test.com', password: 'password' }

follow_redirect!

assert_select 'h1', 'Financials'

end

test 'can access plans for world domination' do

@user=users(:user1)

get login_path

post login_path, session: { email: 'user@test.com', password: 'password' }

follow_redirect!

assert_select 'h1', 'Step1: Take Saskatchewan'

end

a)

A. Duplication

b)

B. Spacing, Duplication

c)

C. Naming

d)

D. Spacing

40.

End-to-end testing là gì?

a)

A. Là 1 thuật ngữ test đầu cuối của chương trình.

b)

B. Là 1 thuật ngữ test, được sử dụng để thực hiện test từ đầu đến cuối chương trình.

c)

C. Là 1 thuật ngữ test, được sử dụng để thực hiện test cho từng function đơn lẻ.

d)

D. Là 1 thuật ngữ test, xác định đầu vào và đầu ra

41.

End-to-end ui test nó nằm ở đâu trong mô hình kim tự tháp?

a)

A. Tầng UI

b)

B. Tầng Intergration

c)

C. Tầng Unit test

d)

D. Đáp án khác

42.

Ajax là gì?

a)

A. Là 1 ngôn ngữ lập trình mới tạo ra bởi Asynchronous Javascript và XML.

b)

B. Là Asynchronous Javascript và XML.

43.

Khi nào thực hiện End-to-end testing?

a)

A. Một sản phẩm đã đủ điều kiện kiểm thử hệ thống trong đó tất cả các chức năng đã được bao phủ.

b)

B. Khi môi trường phụ thuộc được xác định và có sẵn để tiến hành thực hiện theo flow.

c)

C. Khi Tester được trang bị kiến thức cần thiết, thử nghiệm hiện vật, các công cụ thích hợp để phân tích luồng dữ liệu.

d)

D. Cả 3 đáp án trên.

44.

TDD là viết tắt của:

a)

A. Test-Driven Development

b)

B: Test-Driven Develop

c)

C: TestFirst-Driven Developer

d)

D: Tester-Driven Development

45.

Đối với TDD, chọn phương án sai:

a)

A: Refactor là nơi bạn cải thiện source code cho tốt hơn.

b)

B: TDD là thực hành viết các bài tests first trước khi thêm production code.

c)

C: TDD làm việc dựa trên ba bước riêng biệt: Test fail -> test passes -> refactor

d)

D: Chỉ cần thực hiện tuần tự một lần duy nhất vòng đời: Test fail -> test passes -> refactor.