adding more functionality test rate v2

This commit is contained in:
nad 2019-04-10 10:46:43 +02:00
parent 39c930f6ae
commit 17705e459e
4 changed files with 72 additions and 138 deletions

View file

@ -23,7 +23,7 @@ We define 5 categories to measure:
• Functionality (F). Answers to “does the machine work well?” Condition tests fall in here.
• Appearance (A). Aesthetic evaluation, surface deterioration.
Quality (Q). How good is the machine, in terms of performance. Benchmarks, power, and characteristics fall here. The quality score, that represents the performance of the device, the functionality score, that based on the correct working of the buttons, audio and connectivity aspects, and the appaerance score, that focused on the aesthetics and cosmetics aspects like visual damage on screen, buttons or cabinet.
Performance (Q). How good is the machine, in terms of performance. Benchmarks, power, and characteristics fall here. The quality score, that represents the performance of the device, the functionality score, that based on the correct working of the buttons, audio and connectivity aspects, and the appaerance score, that focused on the aesthetics and cosmetics aspects like visual damage on screen, buttons or cabinet.
• Market value (MV). Perceived value, brand recognition, selling value.
• Cost of repair, refurbish and manufacture. ( C )
@ -111,6 +111,8 @@ Elements of effective testing include the following:
• Test results must be retained after unit shipment or sale.
**Example of Theorical Normals**
Characteristics xMin xMax xMax-xMin
@ -135,4 +137,3 @@ Characteristics xMin xMax xMax-xMin
- Camera Resolution 8 64 56
// end

View file

@ -546,6 +546,7 @@ class SnapshotRequest(db.Model):
id = Column(UUID(as_uuid=True), ForeignKey(Snapshot.id), primary_key=True)
request = Column(JSON, nullable=False)
snapshot = relationship(Snapshot,
backref=backref('request',
lazy=True,
uselist=False,
@ -708,7 +709,7 @@ class TestAudio(Test):
Test to check all this aspects related with audio functions, Manual Tests??
"""
loudspeaker = Column(BDEnum(LoudspeakerRange))
loudspeaker.comment = 'Range to determine if the speaker is working properly and what sound quality it has.'
loudspeaker.comment = 'Test to determine if the speaker is working properly and what sound quality it has.'
microphone = Column(Boolean)
microphone.comment = 'This evaluate if microphone works correctly'
@ -726,7 +727,8 @@ class TestConnectivity(Test):
bluetooth.comment = 'Evaluate if bluetooth works'
usb_port = Column(Boolean())
usb_port.comment = 'Evaluate if usb port was detected and charger plug works'
locked = Column(Boolean)
locked.comment = 'Test to check if devices is locked'
class TestBattery(Test):
"""
@ -747,6 +749,21 @@ class TestCamera(Test):
# TODO define when test FAIL
"""
camera = Column(Boolean)
camera.comment = ""
class TestKeyboard(Test):
"""
Test to determinate if keyboard layout are and works correctly
"""
keyboard = Column(Boolean)
keyboard.comment = ""
class TestTrackpad(Test):
"""Test trackpad works correctly"""
trackpad = Column(Boolean)
trackpad.comment = ""
class TestBios(Test):
@ -880,13 +897,7 @@ class RateComputer(Rate):
# self.network_adapter = device.network_adapter.rate
...
COMPONENTS_WEIGHTS = [
PROCESSOR_WEIGHT = 0.1,
RAM_WEIGHT = 0.25,
DATA_STORAGE_WEIGHT = 0.05,
GRAPHIC_CARD_WEIGHT = 0.1,
...
]
COMPONENTS_WEIGHTS..
return harmonic_mean(self.processor, self.ram, self.data_storage, self.graphic_card, ..., COMPONENTS_WEIGHTS)
@ -972,14 +983,14 @@ class RateLaptop(RateComputer):
...
COMPONENTS_WEIGHTS = [
PROCESSOR_WEIGHT = 0.1,
RAM_WEIGHT = 0.25,
DATA_STORAGE_WEIGHT = 0.05,
GRAPHIC_CARD_WEIGHT = 0.1,
DISPLAY_WEIGHT = 0.3,
BATTERY_WEIGHT = 0.25,
CAMERA_WEIGHT = 0.1,
...
PROCESSOR_WEIGHT: 0.1,
RAM_WEIGHT: 0.25,
DATA_STORAGE_WEIGHT: 0.05,
GRAPHIC_CARD_WEIGHT: 0.1,
DISPLAY_WEIGHT: 0.3,
BATTERY_WEIGHT: 0.25,
CAMERA_WEIGHT: 0.1,
... ...
]
return harmonic_mean(self.processor, self.ram, self.data_storage, self.graphic_card, self.display,
@ -1093,13 +1104,13 @@ class RateMobile(Rate):
...
COMPONENTS_WEIGHTS = [
PROCESSOR_WEIGHT = 0.1,
RAM_WEIGHT = 0.25,
DATA_STORAGE_WEIGHT = 0.05,
GRAPHIC_CARD_WEIGHT = 0.1,
DISPLAY_WEIGHT = 0.3,
BATTERY_WEIGHT = 0.25,
CAMERA_WEIGHT = 0.1,
PROCESSOR_WEIGHT: 0.1,
RAM_WEIGHT: 0.25,
DATA_STORAGE_WEIGHT: 0.05,
GRAPHIC_CARD_WEIGHT: 0.1,
DISPLAY_WEIGHT: 0.3,
BATTERY_WEIGHT: 0.25,
CAMERA_WEIGHT: 0.1,
...
]
@ -1162,6 +1173,7 @@ class RateMonitor(Rate):
Main class to group by device type: Monitor
Computer is broadly extended by ``ComputerMonitor``, ``TelevisionSet``, and
`` Projector``.
Important: Aspect ratio is an important variable in screen features
"""
id = Column(UUID(as_uuid=True), ForeignKey(Rate.id), primary_key=True)

View file

@ -92,12 +92,26 @@ class FunctionalityRate(BaseRate):
LOUDSPEAKER_WEIGHT = 0.15
MICROPHONE_WEIGHT = 0.15
def compute(self, FunctionalityRate: FunctionalityRate):
@classmethod
def compute(cls, device: Device):
"""
:param FunctionalityDevice: List[Boolean]
:return:
"""
test_bios_power_on = device.last_event_of(TestBios).bios_power_on # type: bool
test_bios_power_on = int(test_bios_power_on)
test_battery = device.last_event_of(TestBattery)
test_audio
test_data_storage
functionality = test_bios.bios_power_on * self.BIOS_WEIGHT + ...
return cls(funcionality=functionality)
# TODO Check if funcionality aspect is != NULL
sim = FunctionalityDevice.sim * self.SIM_WEIGHT
usb = FunctionalityDevice.usb * self.USB_WEIGHT
@ -127,110 +141,6 @@ class Appearance(Range):
NONE = -0.3
class FinalRate(Rate):
"""The act of grading the appearance, quality (performance), and functionality
of a device.
There are five categories of ``Rate``:
1. ``Quality``. How good is the machine, in terms of performance.
2. ``Functionality``.
3. ``Appearance``.
4. ``Market value``.
5. ``Cost of repair``.
There are types of rating a device:
1. Rate Quality
2. Rate Functionality
3. Rate Final
"""
quality_rate = QualityRate()
functionality_rate = FunctionalityRate()
appearance_rate = Appearance()
final_rate = None
# TODO Develop merge rate aspects (categories)
""" MANUAL INPUT """
manual_id = Column(UUID(as_uuid=True), ForeignKey(ManualRate.id))
manual_id.comment = """The ManualEvent used to generate this
aggregation, or None if none used.
An example of ManualEvent is using the web or the Android app
to rate a device.
"""
manual = relationship(ManualRate,
backref=backref('aggregate_rate_manual',
lazy=True,
order_by=lambda: ResultRate.created,
collection_class=OrderedSet),
primaryjoin=manual_id == ManualRate.id)
""" WORKBENCH COMPUTER """
workbench_computer_id = Column(UUID(as_uuid=True), ForeignKey(QualityRateComputer.id))
workbench_computer_id.comment = """The WorkbenchRate used to generate
this aggregation, or None if none used.
"""
workbench_computer = relationship(QualityRateComputer,
backref=backref('aggregate_rate_workbench',
lazy=True,
order_by=lambda: ResultRate.created,
collection_class=OrderedSet),
primaryjoin=workbench_computer_id == QualityRateComputer.id)
""" WORKBENCH MOBILE """
workbench_mobile_id = Column(UUID(as_uuid=True), ForeignKey(QualityRateMobile.id))
workbench_mobile_id.comment = """The WorkbenchRate used to generate
this aggregation, or None if none used.
"""
workbench_mobile = relationship(QualityRateMobile,
backref=backref('aggregate_rate_workbench',
lazy=True,
order_by=lambda: ResultRate.created,
collection_class=OrderedSet),
primaryjoin=workbench_mobile_id == QualityRateMobile.id)
def __init__(self, *args, **kwargs) -> None:
kwargs.setdefault('version', StrictVersion('1.0'))
super().__init__(*args, **kwargs)
@classmethod
def quality_rate(cls, quality: QualityRate):
pass
@classmethod
def functionality_rate(cls, func: FunctionalityRate):
pass
@classmethod
def final_rate(cls, rate: Rate):
pass
# Categories
@classmethod
def quality_category(cls, quality: QualityRate):
pass
@classmethod
def functionality_category(cls, quality: QualityRate):
pass
@classmethod
def appearance_category(cls, quality: QualityRate):
pass
@classmethod
def maket_value_category(cls, quality: QualityRate):
pass
@classmethod
def cost_of_repair_category(cls, quality: QualityRate):
pass
class DisplayRate(QualityRate):
"""
Calculate a DisplayRate

View file

@ -119,13 +119,24 @@ def test_functionality_rate():
def test_functionality_rate_miss_tests():
"""
Functionality Rate Test
Test to check if functionality rate compute correctly without complete information of test.
Test to check if functionality rate compute correctly with some test without any information.
"""
pass
@pytest.mark.xfail(reason='Develop')
@pytest.mark.xfail(reason='Discuss')
def test_appearance_rate():
"""
Test to check if compute correctly a new rate of a device, only with visual test
"""
pass
@pytest.mark.xfail(reason='Discuss')
def test_update_rate_with_manual_rate():
"""
Test to check if compute correctly a new rate of a device, if this device input after a manual rate (like visual test)
Computing a new rate with old snapshot information score and aggregate a new test information score.
"""
pass